[PATCH] D38361: [ELF] Stop setting output section size early

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 10 04:45:06 PDT 2017


jhenderson added inline comments.


================
Comment at: ELF/SyntheticSections.cpp:1180
 
+template <class ELFT> void DynamicSection<ELFT>::postThunkContents() {
+  if (!InX::MipsGot)
----------------
ruiu wrote:
> Is there any way other than backfilling DT_MIPS_LOCAL_GOTNO?
> 
> For example, .eh_frame_hdr depends on .eh_frame, and that dependency is handled simply by calling .eh_frame's writeTo before .eh_frame_hdr's writeTo. Unless there is a circular dependency, you don't need to backfill a value.
You're right, there isn't actually a circular dependency here. We can set the value during writeTo. There is an alternative option - move the adding of the tag (and the DT_NULL tag) into postThunkContents (or optionally all tags), since I don't think there's any dependency on the dynamic section size in thunk creation or the MIPS GOT creation.


https://reviews.llvm.org/D38361





More information about the llvm-commits mailing list