[PATCH] D40967: [LLD][ELF] Remove Duplicate .ARM.exidx sections
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 12 11:11:28 PST 2017
On 12 December 2017 at 19:03, Rafael Avila de Espindola
<rafael.espindola at gmail.com> wrote:
> Peter Smith via Phabricator <reviews at reviews.llvm.org> writes:
>
>> + struct ExidxEntry {
>> + uint32_t Fn;
>> + uint32_t Unwind;
>> + };
>> +
>> + // Get the last table Entry from the previous .ARM.exidx section.
>> + const ExidxEntry PrevEntry = *reinterpret_cast<const ExidxEntry *>(
>> + Prev->Data.data() + Prev->getSize() - sizeof(ExidxEntry));
>> + if (IsExtabRef(PrevEntry.Unwind))
>> + return false;
>
> This is not safe in a big endian host, no?
I think you're right. I'll send an update tomorrow.
> Don't we have support for dumpling exidx in llvm-objdump? I was
> surprised to not find it in Object/ELFTypes.h.
>
I think that there is support in llvm-readobj with the -u option. I'll
check to see if it makes the tests easier to read.
> I really like the idea to make this section based. It is *so* much
> better than the .eh_frame situation. It still allows full optimization
> if the code is compiled with -ffunction-sections, correct?
Yes, with each function in its own section there will be one
.ARM.exidx section with a single entry.
More information about the llvm-commits
mailing list