diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2018-06-03 12:34:04 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2018-06-03 12:34:04 +0000 |
commit | 23dfb1b06b59f43c3e7e1cd96f1bc291f0b1b683 (patch) | |
tree | 3b77bf9840a3460021d973e795de368d8e8461de /gnu | |
parent | 7245c5d30b446ec520202890a2d74e7fb34be88c (diff) |
Work around a bug where discarding the .ARM.exidx section in the armv7 kernel
linker script makes ld.lld(1) crash. This has been fixed in a different
(proper?) way upstream but backporting their fix is a bit too invasive.
ok patrick@
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/llvm/tools/lld/ELF/SyntheticSections.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gnu/llvm/tools/lld/ELF/SyntheticSections.cpp b/gnu/llvm/tools/lld/ELF/SyntheticSections.cpp index a5a851f9540..4dd16a2ae24 100644 --- a/gnu/llvm/tools/lld/ELF/SyntheticSections.cpp +++ b/gnu/llvm/tools/lld/ELF/SyntheticSections.cpp @@ -2571,6 +2571,9 @@ void ARMExidxSentinelSection::writeTo(uint8_t *Buf) { // The sentinel has to be removed if there are no other .ARM.exidx entries. bool ARMExidxSentinelSection::empty() const { OutputSection *OS = getParent(); + if (!OS) + return false; + for (auto *B : OS->SectionCommands) if (auto *ISD = dyn_cast<InputSectionDescription>(B)) for (auto *S : ISD->Sections) |