[PATCH] D40967: [LLD][ELF] Remove Duplicate .ARM.exidx sections

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 12 11:03:17 PST 2017


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?
Don't we have support for dumpling exidx in llvm-objdump? I was
surprised to not find it in Object/ELFTypes.h.

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?

Thanks,
Rafael


More information about the llvm-commits mailing list