diff options
| author | Peter Smith <peter.smith@linaro.org> | 2019-03-21 14:06:40 +0000 |
|---|---|---|
| committer | Peter Smith <peter.smith@linaro.org> | 2019-03-21 14:06:40 +0000 |
| commit | d3511a214e47a54d840f4c0efe80ea94f60f5f25 (patch) | |
| tree | 4c375e45762050f8a1b3d3413fffaf435ad2e95e /lld/ELF/OutputSections.cpp | |
| parent | d47eac59efb1de3a4fe797c54e116de55c6559e2 (diff) | |
| download | bcm5719-llvm-d3511a214e47a54d840f4c0efe80ea94f60f5f25.tar.gz bcm5719-llvm-d3511a214e47a54d840f4c0efe80ea94f60f5f25.zip | |
[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
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
| -rw-r--r-- | lld/ELF/OutputSections.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index a7f35ebfc57..4cb5a3cdc59 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -289,7 +289,9 @@ void OutputSection::finalize() { // SHF_LINK_ORDER flag. The dependency is indicated by the sh_link field. We // need to translate the InputSection sh_link to the OutputSection sh_link, // all InputSections in the OutputSection have the same dependency. - if (auto *D = First->getLinkOrderDep()) + if (auto *EX = dyn_cast<ARMExidxSyntheticSection>(First)) + Link = EX->getLinkOrderDep()->getParent()->SectionIndex; + else if (auto *D = First->getLinkOrderDep()) Link = D->getParent()->SectionIndex; } |

