[PATCH] D67848: [LLD][ELF][ARM] Fix crash when discarding all of the InputSections that have .ARM.exidx sections
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 21 07:19:04 PDT 2019
MaskRay added inline comments.
================
Comment at: lld/ELF/SyntheticSections.cpp:3228
if (isec->type == SHT_ARM_EXIDX) {
- exidxSections.push_back(isec);
- return true;
+ if (InputSection* dep = isec->getLinkOrderDep())
+ if (isValidExidxSectionDep(dep)) {
----------------
```
if (isec->type == SHT_ARM_EXIDX) {
exidxSections.push_back(isec);
return true;
}
```
probably also works. finalizeContents() has logic to filter dead InputSections, so I'm thinking whether we should simplify the logic here.
================
Comment at: lld/test/ELF/arm-exidx-discard-all.s:1
+// REQUIRES: arm
+// RUN: llvm-mc -filetype=obj -triple arm-gnu-linux-eabi -mcpu cortex-a7 -arm-add-build-attributes %s -o %t.o
----------------
How about moving this to linkerscript/? There are 2 arm-exidx* tests.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67848/new/
https://reviews.llvm.org/D67848
More information about the llvm-commits
mailing list