[PATCH] D38361: [ELF] Stop setting output section size early
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 5 20:26:31 PDT 2017
ruiu added a comment.
This is much more complicated than https://reviews.llvm.org/D38321, but I wonder if it has to be. I feel like this part of code is becoming out of control.
Speaking of this patch, why don't you assign offsets in `maybeCompress`?
================
Comment at: ELF/SyntheticSections.cpp:844-848
+ // The OutputSection Size is not set until after assignAddresses has been
+ // called, so we cannot use it. Instead we make a rough estimate of the
+ // section size, which should be sufficient as long as users don't start
+ // modifying the section size via the linker script.
+ PageEntriesNum += getMipsPageCount(estimateOutputSectionSize(P.first));
----------------
What happens when a user starts modifying the output using the linker script?
https://reviews.llvm.org/D38361
More information about the llvm-commits
mailing list