[PATCH] D23534: [ELF] Linkerscript: support hidden symbols assignments
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 15 16:38:07 PDT 2016
ruiu added inline comments.
================
Comment at: ELF/LinkerScript.cpp:970
@@ -969,3 +969,3 @@
SymbolAssignment *ScriptParser::readProvide(bool Hidden) {
expect("(");
----------------
I'd change this function `readProvideHidden(bool Provide, bool Hidden)` and then
================
Comment at: ELF/LinkerScript.cpp:973-974
@@ -972,4 +972,4 @@
SymbolAssignment *Cmd = readAssignment(next());
Cmd->Provide = true;
Cmd->Hidden = Hidden;
expect(")");
----------------
do
Cmd->Provide = Provide;
Cmd->Hidden = Hidden;
================
Comment at: ELF/LinkerScript.cpp:985-994
@@ -984,6 +984,12 @@
expect(";");
+ } else if (Tok == "HIDDEN") {
+ expect("(");
+ Cmd = readAssignment(next());
+ Cmd->Hidden = true;
+ expect(")");
+ expect(";");
} else if (Tok == "PROVIDE") {
Cmd = readProvide(false);
} else if (Tok == "PROVIDE_HIDDEN") {
Cmd = readProvide(true);
}
----------------
so that I can do
} else if (Tok == "PROVIDE"))
Cmd = readProvideHidden(true, false);
} else if (Tok == "HIDDEN")) {
Cmd = readProvideHidden(false, true);
} else if (Tok == "PROVIDE_HIDDEN")) {
Cmd = readProvideHidden(true, true);
}
https://reviews.llvm.org/D23534
More information about the llvm-commits
mailing list