diff options
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) |