[PATCH] D38239: [ELF] - Define linkerscript symbols early.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 05:10:33 PDT 2017


grimar added inline comments.


================
Comment at: ELF/Driver.cpp:1043
+  // so we can version them and change attributes before normal
+  // script commands proccessing where their values are finalized.
+  Script->defineSymbols();
----------------
smeenai wrote:
> Typo: proccessing -> processing
Fixed, thanks !


================
Comment at: ELF/LinkerScript.cpp:168-172
+    // Symbol already defined is a simple case, we only want to set the flag.
+    if (SymbolBody *B = Symtab->find(Cmd->Name)) {
+      B->symbol()->CanInline = false;
+      continue;
+    }
----------------
ruiu wrote:
> I don't think you need this.
Yes, you right. I tried to make logic handling PROVIDE nicer, so using early return
seemed both common and helpfull.
I found better approach for this diff it seems - to just drop the `Provide` flag after proccessing.


https://reviews.llvm.org/D38239





More information about the llvm-commits mailing list