Error instead of ignoring broken debug info.
Thanks to Davide for noticing. llvm-svn: 319401
This commit is contained in:
parent
9850276267
commit
8ce6db0c4b
|
|
@ -69,10 +69,12 @@ LLDDwarfObj<ELFT>::findAux(const InputSectionBase &Sec, uint64_t Pos,
|
|||
const typename ELFT::Sym &Sym = File->getELFSyms()[SymIndex];
|
||||
uint32_t SecIndex = File->getSectionIndex(Sym);
|
||||
|
||||
// Broken debug info can point to a non-Defined symbol, just ignore it.
|
||||
// Broken debug info can point to a non-Defined symbol.
|
||||
auto *DR = dyn_cast<Defined>(&File->getRelocTargetSym(Rel));
|
||||
if (!DR)
|
||||
if (!DR) {
|
||||
error("unsupported relocation target while parsing debug info");
|
||||
return None;
|
||||
}
|
||||
uint64_t Val = DR->Value + getAddend<ELFT>(Rel);
|
||||
|
||||
// FIXME: We should be consistent about always adding the file
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
# The debug info has a broken relocation. Check that we don't crash
|
||||
# and still report the undefined symbol.
|
||||
|
||||
# CHECK: error: unsupported relocation target while parsing debug info
|
||||
# CHECK: error: undefined symbol: bar
|
||||
|
||||
--- !ELF
|
||||
|
|
|
|||
Loading…
Reference in New Issue