[PATCH] D25127: [ARM][LLD] .ARM.exidx support for executables/shared libraries

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 3 09:47:46 PDT 2016


Can you split this further?

It would be nice to have a patch taking care of only which sections
are gced. That is, it just makes sure that we keep only the sections
that refer to a kept section.

Cheers,
Rafael


On 30 September 2016 at 17:03, Peter Smith <peter.smith at linaro.org> wrote:
> peter.smith created this revision.
> peter.smith added reviewers: ruiu, rafael, grimar.
> peter.smith added a subscriber: llvm-commits.
> Herald added subscribers: samparker, rengolin, aemerson.
>
> This is the first part of a series of patches derived from https://reviews.llvm.org/D24728
>
> Apologies for the delay in posting this, I wanted to wait for Phab to come back up.
>
> In this patch support for .ARM.exidx sections has been added for Executables and Shared Libraries. The majority of the code is identical to the changes discussed in https://reviews.llvm.org/D24788 with the following differences:
>
> - Garbage collection is fully implemented and tested, .ARM.exidx is live only when the section it depends on is live.
> - The SHF_LINK_ORDER flag on the .ARM.exidx OutputSection is cleared for Executables and Shared libraries as it only has meaning in a relocatable object.
> - I've moved the code to find the link order dependency to InputSection from OutputSection as MarkLive needs it, and in a future patch for relocatable links the OutputSection::finalize() will also need it.
>
> Follow up patches to come shortly:
>
> - Implement R_ARM_TARGET2 relocation.
> - Allow R_ARM_PREL31 and R_ARM_NONE relocations to be used in shared objects.
> - Maintain the full section name when doing a relocatable link, for example .text.foo should not be truncated and merged with other .text sections.
> - Add support for .ARM.exidx for relocatable links.
>
>
> https://reviews.llvm.org/D25127
>
> Files:
>   ELF/InputFiles.h
>   ELF/InputSection.cpp
>   ELF/InputSection.h
>   ELF/MarkLive.cpp
>   ELF/OutputSections.cpp
>   ELF/Writer.cpp
>   test/ELF/Inputs/arm-exidx-cantunwind.s
>   test/ELF/arm-exidx-canunwind.s
>   test/ELF/arm-exidx-gc.s
>   test/ELF/arm-exidx-order.s
>   test/ELF/arm-exidx-output.s
>


More information about the llvm-commits mailing list