[ELF][ARM] Redesign of .ARM.exidx handling to use a SyntheticSection
authorPeter Smith <peter.smith@linaro.org>
Thu, 21 Mar 2019 14:06:40 +0000 (14:06 +0000)
committerPeter Smith <peter.smith@linaro.org>
Thu, 21 Mar 2019 14:06:40 +0000 (14:06 +0000)
commitd3511a214e47a54d840f4c0efe80ea94f60f5f25
tree4c375e45762050f8a1b3d3413fffaf435ad2e95e
parentd47eac59efb1de3a4fe797c54e116de55c6559e2
[ELF][ARM] Redesign of .ARM.exidx handling to use a SyntheticSection

Instead of creating extra Synthetic .ARM.exidx sections to account for
gaps in the table, create a single .ARM.exidx SyntheticSection that can
derive the contents of the gaps from a sorted list of the executable
InputSections. This has the benefit of moving the ARM specific code for
SyntheticSections in SHF_LINK_ORDER processing and the table merging code
into the ARM specific SyntheticSection. This also makes it easier to create
EXIDX_CANTUNWIND table entries for executable InputSections that don't
have an associated .ARM.exidx section.

Fixes pr40277

Differential Revision: https://reviews.llvm.org/D59216

llvm-svn: 356666
lld/ELF/OutputSections.cpp
lld/ELF/SyntheticSections.cpp
lld/ELF/SyntheticSections.h
lld/ELF/Writer.cpp
lld/test/ELF/arm-data-prel.s
lld/test/ELF/arm-exidx-add-missing.s [new file with mode: 0644]
lld/test/ELF/arm-exidx-canunwind.s
lld/test/ELF/arm-exidx-dedup.s
lld/test/ELF/arm-exidx-gc.s
lld/test/ELF/arm-exidx-no-add-missing.s [new file with mode: 0644]
lld/test/ELF/arm-exidx-shared.s