From 82cd488af59ef42775b2d45c2d064641c1a09ab8 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Mon, 7 Dec 2020 20:24:12 +0900 Subject: [PATCH] temporary --- linker_script.cc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/linker_script.cc b/linker_script.cc index 96012612..3129e764 100644 --- a/linker_script.cc +++ b/linker_script.cc @@ -25,6 +25,14 @@ static std::vector tokenize(StringRef input) { continue; } + if (input[0] == '#') { + int pos = input.find("\n", 1); + if (pos == StringRef::npos) + break; + input = input.substr(pos + 1); + continue; + } + if (input[0] == '"') { int pos = input.find('"', 1); if (pos == StringRef::npos) @@ -160,4 +168,14 @@ void parse_version_script(StringRef path) { if (!tok.empty()) error(path + ": trailing garbage token: " + tok[0]); + + llvm::outs() << "local:"; + for (StringRef s : config.verdefs[VER_NDX_LOCAL]) + llvm::outs() << " " << s; + llvm::outs() << "\n"; + + llvm::outs() << "global:"; + for (StringRef s : config.verdefs[VER_NDX_GLOBAL]) + llvm::outs() << " " << s; + llvm::outs() << "\n"; }