The current COFF unwind printer tries to print SEH handler function names,
assuming that it can always find function names in string table. It crashes
if file being read has no symbol table (i.e. executable).
With this patch, llvm-objdump prints SEH handler's RVA if there's no symbol
table entry for that RVA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202466
91177308-0d34-0410-b5e6-
96231b3b80d8
return EC;
if (Ofs == Offset) {
Sym = *I->getSymbol();
return EC;
if (Ofs == Offset) {
Sym = *I->getSymbol();
+ return object_error::success;
- return object_error::success;
+ return object_error::parse_failed;
}
// Given a vector of relocations for a section and an offset into this section
}
// Given a vector of relocations for a section and an offset into this section
const std::vector<RelocationRef> &Rels,
uint64_t Offset, uint32_t Disp) {
StringRef Sym;
const std::vector<RelocationRef> &Rels,
uint64_t Offset, uint32_t Disp) {
StringRef Sym;
- if (error(resolveSymbolName(Rels, Offset, Sym)))
- return;
- Out << Sym;
- if (Disp > 0)
- Out << format(" + 0x%04x", Disp);
+ if (!resolveSymbolName(Rels, Offset, Sym)) {
+ Out << Sym;
+ if (Disp > 0)
+ Out << format(" + 0x%04x", Disp);
+ } else {
+ Out << format("0x%04x", Disp);
+ }