[PATCH] D26349: [ELF] Convert .got.plt section to input section

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 9 15:08:05 PST 2016


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM with my previous comments addressed.



================
Comment at: ELF/Writer.cpp:857
+    addInputSec(In<ELFT>::GotPlt);
+    In<ELFT>::GotPlt->OutSec->assignOffsets();
+  }
----------------
evgeny777 wrote:
> ruiu wrote:
> > I want to avoid calling `assignOffsets` more than once to redo it. It is not only inefficient but also confusing. Could you add this section earlier than this to avoid this function call?
> The problem with .got.plt is that it shouldn't be added if it is empty. Whether or not it is empty is known only after call to scanRelocs(). So if you add it early you'll have to do a fixup procedure later
OK. Please add this as a comment.


https://reviews.llvm.org/D26349





More information about the llvm-commits mailing list