[lld] lld: add support for NOCROSSREFS(_TO) (PR #95714)
Daniel Thornburgh via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 20 11:02:42 PDT 2024
================
@@ -235,6 +236,32 @@ void ScriptParser::readVersionScriptCommand() {
}
}
+void ScriptParser::readNoCrossRefs(bool to) {
+ expect("(");
+
+ script->noCrossRefLists.push_back({});
+ auto &list = script->noCrossRefLists.back();
+
+ if (to && peek() != ")") {
+ StringRef toSection = next();
+
+ list.toSection = toSection;
+ }
+
+ while (!atEOF() && !errorCount() && peek() != ")") {
+ StringRef section = next();
+
+ list.outputSections.push_back(section);
+ }
----------------
mysterymath wrote:
```suggestion
while (!atEOF() && !errorCount() && peek() != ")")
list.outputSections.push_back(next());
```
https://github.com/llvm/llvm-project/pull/95714
More information about the llvm-commits
mailing list