Commit 94e7307d authored by Hans Wennborg's avatar Hans Wennborg
Browse files

Merging r368041:

------------------------------------------------------------------------
r368041 | psmith | 2019-08-06 16:13:38 +0200 (Tue, 06 Aug 2019) | 16 lines

[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

------------------------------------------------------------------------

llvm-svn: 368270
parent 343874d1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment