[PATCH] D24135: [ELF] Linkerscript: support ABSOLUTE keyword in symbol assignment expression
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 1 13:41:55 PDT 2016
ruiu added inline comments.
================
Comment at: ELF/LinkerScript.cpp:279
@@ -278,1 +278,3 @@
+template <class ELFT>
+static void finalizeSectionSym(SymbolAssignment *Cmd,
----------------
Needs comment.
================
Comment at: ELF/LinkerScript.cpp:283
@@ +282,3 @@
+ typename ELFT::uint Off) {
+ if (auto *Body = cast_or_null<DefinedSynthetic<ELFT>>(Cmd->Sym)) {
+ Symbol *S = Body->symbol();
----------------
Early return.
================
Comment at: ELF/LinkerScript.cpp:286-287
@@ +285,4 @@
+ if (Cmd->ForceAbsolute) {
+ replaceBody<DefinedRegular<ELFT>>(S, Cmd->Name,
+ static_cast<uint8_t>(S->Visibility));
+ Body->Value = Cmd->Expression(Sec->getVA() + Off);
----------------
Why do you have to replace a symbol here only when it is an absolute symbol?
Repository:
rL LLVM
https://reviews.llvm.org/D24135
More information about the llvm-commits
mailing list