[PATCH] D33496: [LLD][ELF] Move creation of .ARM.exidx sentinel before LinkerScript creation

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 05:25:34 PDT 2017


There isn't a problem visible right now as synchronize() fixes the
discrepancy of OutputSectionCommand and OutputSection when a linker
script is used. The code in synchronize() can't be removed just yet as
the same code is also handling the discrepancy cause by the insertion
of thunks. The synchronize() function can be removed completely when
the thunk implementation is converted to insert into
InputSectionDescriptions.

It is possible to insert the sentinel directly into an
OutputSectionCommand in its current place but it is a bit messier.
I'll update the patch and D33500 to see if you prefer it or not.

On 25 May 2017 at 01:05, Rafael Avila de Espindola
<rafael.espindola at gmail.com> wrote:
> Peter Smith via Phabricator <reviews at reviews.llvm.org> writes:
>
>> peter.smith created this revision.
>> Herald added subscribers: emaste, rengolin, aemerson.
>>
>> This change moves the creation of the .ARM.exidx sentinel section forward so that it is assigned to an OutputSection/InputSectionDescription with the existing .ARM.exidx sections.
>>
>
> It is already before fabricateDefaultCommands, so I assume the problem
> is now visible only with a linker script, correct?
>
> The problem, if I understand it, is that we create a
> ARMExidxSentinelSection and add it to an OutputSection, but not an
> OutputSectionCommand. Is Script->synchronize() currently taking care of
> this? If so, can you remove the code that does it in this commit?
>
> Instead of moving the creation earlier, could you add it to a
> OutputSectionCommand when it is created at its current position?
>
> Cheers,
> Rafael


More information about the llvm-commits mailing list