[PATCH] D25127: [ARM][LLD] .ARM.exidx support for executables/shared libraries
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 30 14:03:05 PDT 2016
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25127.73131.patch
Type: text/x-patch
Size: 24539 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160930/59f6b75c/attachment.bin>
More information about the llvm-commits
mailing list