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

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 9 08:43:02 PDT 2017


peter.smith added a comment.

> Whilst attempting to avoid this estimating by calling assignAddresses again, I found another issue, which is also theoretically present prior to my changes: the DT_MIPS_LOCAL_GOTNO depends on the number of local got entries, but these are dependent on the size calculated in updateAllocSize(). Updating this size, e.g. due to additional thunks being created, might render the the dynamic tag value invalid.

My apologies for missing that at the time, unfortunately I'm not too familiar with the Mips ABI. It looks like it could be fixed by implementing DynamicSection::postThunkContents() and updating the value of DT_MIPS_LOCAL_GOTNO. Luckily this won't change the size of the .dynamic section so it can be delayed.


https://reviews.llvm.org/D38361





More information about the llvm-commits mailing list