[PATCH] D33239: [LLD][ELF] Make SHF_LINK_ORDER section ordering use InputSectionDescriptions

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Mon May 22 02:27:56 PDT 2017


It does not have to be right now, although there is an advantage (not
currently exploited) in moving it before Thunk Creation. The
.ARM.exidx table format has been designed to allow adjacent entries
with the same unwinding instructions to be compressed into a single
entry. This can be common especially when many functions have the
special can't unwind entry 0x1. Performing the table compression will
affect the size of the .ARM.exidx section and may affect the address
assignment of following sections, which in unlucky cases interfere
with the range thunk calculations.

If lld and C++ becomes used by embedded systems it will be important
to do the table compression as the size savings can be significant for
resource constrained devices. I'm happy not to move it now, and move
it if the optimization is implemented.

On 19 May 2017 at 23:55, Rafael Ávila de Espíndola via Phabricator
<reviews at reviews.llvm.org> wrote:
> rafael added a comment.
>
> The sorting does have to be made at the linker script level, but why do you have to change when it is made? Can the call to Script->sortLinkOrder be just before
>
>   for (OutputSection *Sec : OutputSections)
>     Sec->finalize<ELFT>();
>
>
> https://reviews.llvm.org/D33239
>
>
>


More information about the llvm-commits mailing list