[PATCH] D36986: [ELF] Generate symbol assignments for predefined symbols
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 30 15:10:26 PDT 2017
ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.
LGTM
I have a little concern about this patch because this patch makes lld a bit more interpret-y. GNU bfd linker has a notion of "internal" linker script which drives the entire linking process, and I don't like the idea because that's too abstract to my taste. In lld, we take more direct approach to create a result: everything is directly driven by code and the flow of control is basically not controlled by scripts. This patch seems like a deviation from that design.
That being said, this patch looks what it should do in a simplest possible way, so I think I'm fine with this. I'm just expressing my thought.
================
Comment at: ELF/Writer.cpp:204
+ // Generate assignments for predefined symbols before assigning addresses.
+ addPredefinedSymbols();
----------------
I'd explain what is "predefined" a bit more, as this comment is essentially the same as the function name.
================
Comment at: ELF/Writer.cpp:927
+// This function generates assignments for predefined symbols and inserts them
+// into the commands sequence to be processed at the appropriate time. This
----------------
predefined symbols (e.g. _end or _etext)
Repository:
rL LLVM
https://reviews.llvm.org/D36986
More information about the llvm-commits
mailing list