HomePhabricator

[ELF][ARM] Fix /DISCARD/ of section with .ARM.exidx section

Description

[ELF][ARM] Fix /DISCARD/ of section with .ARM.exidx section

The combineEhSections runs, by design, before processSectionCommands so
that input exception sections like .ARM.exidx and .eh_frame are not assigned
to OutputSections. Unfortunately if /DISCARD/ removes InputSections that
have associated .ARM.exidx sections without discarding the .ARM.exidx
synthetic section then we will end up crashing when trying to sort the
InputSections in ascending address order.

We fix this by filtering out the sections that have been discarded prior
to processing the InputSections in finalizeContents().

fixes pr42890

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

Details

Committed
psmithAug 6 2019, 7:13 AM
Differential Revision
D65759: [ELF][ARM] Fix /DISCARD/ of section with .ARM.exidx section
Parents
rL368040: Update latest release to 8.0.1
Branches
Unknown
Tags
Unknown