[PATCH] D17774: [ELF] - do not create special symbols when creating relocatable output
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 1 10:57:46 PST 2016
ruiu added inline comments.
================
Comment at: ELF/Writer.cpp:1004
@@ -1003,4 +1003,3 @@
// addresses of each section by section name. Add such symbols.
- addStartEndSymbols();
- for (OutputSectionBase<ELFT> *Sec : RegularSections)
- addStartStopSymbols(Sec);
+ if (!Config->Relocatable) {
+ addStartEndSymbols();
----------------
grimar wrote:
> ruiu wrote:
> > Instead of here, please add "if (Config->Relocatable) return;" at beginning of addStartEndSymbols.
> But what about addStartStopSymbols() ? Should I add the same there ? I not sure that it is good because will iterate over all RegularSections, thats not wasting but somewhat confusing to do that without reasons.
That makes sense. Let's go with your code then.
http://reviews.llvm.org/D17774
More information about the llvm-commits
mailing list