[PATCH] D25234: [LLD][ARM] Garbage collection support for .ARM.exidx sections

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 4 06:08:37 PDT 2016


peter.smith created this revision.
peter.smith added reviewers: ruiu, rafael.
peter.smith added a subscriber: llvm-commits.
Herald added subscribers: samparker, sanjoy, rengolin, aemerson.

The .ARM.exidx sections have a reverse dependency on the InputSections that they have a link order dependency to. In effect they should be live only if the InputSection they refer to via the sh_link field is live.

I've used a single pointer to InputSection rather than a vector as there is an InputSection can only have at most one InputSection (.ARM.exidx) with a SHF_LINK_ORDER dependency on it.

This has been split off from https://reviews.llvm.org/D25127 which contains the basic .ARM.exidx recognition and sorting. It implements Rui's suggestion of adding the reverse dependency to InputSections.

The lld changes don't depend on https://reviews.llvm.org/D25127 but the test case may do as it checks the contents of the .ARM.exidx section.


https://reviews.llvm.org/D25234

Files:
  ELF/InputFiles.cpp
  ELF/InputSection.h
  ELF/MarkLive.cpp
  test/ELF/arm-exidx-gc.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25234.73467.patch
Type: text/x-patch
Size: 6200 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161004/50602293/attachment.bin>


More information about the llvm-commits mailing list