[PATCH] D93367: [ELF] --emit-relocs: fix a crash if .rela.dyn is an empty output section
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 16 00:28:56 PST 2020
MaskRay marked an inline comment as done.
MaskRay added inline comments.
================
Comment at: lld/ELF/OutputSections.cpp:406
// all InputSections in the OutputSection have the same dependency.
if (auto *ex = dyn_cast<ARMExidxSyntheticSection>(first))
link = ex->getLinkOrderDep()->getParent()->sectionIndex;
----------------
grimar wrote:
> I wonder if the same crash can happen here with an empty `.ARM.exidx`?
It can't (I believe `flags & SHF_LINK_ORDER` ensures there is at least one input section but it is very late for me and I don't think carefully though:( )
There are many `arm-exidx-*` tests and someone may need to check whether this is missing test coverage.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93367/new/
https://reviews.llvm.org/D93367
More information about the llvm-commits
mailing list