mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-08 03:30:22 +00:00
[llvm-objdump] improve error reporting of bad mach-o ordinals
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217909 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ca7da16ca0
commit
ce90652489
@ -2446,9 +2446,15 @@ static StringRef ordinalName(const object::MachOObjectFile *Obj, int Ordinal) {
|
||||
case MachO::BIND_SPECIAL_DYLIB_FLAT_LOOKUP:
|
||||
return "flat-namespace";
|
||||
default:
|
||||
Obj->getLibraryShortNameByIndex(Ordinal-1, DylibName);
|
||||
return DylibName;
|
||||
if (Ordinal > 0) {
|
||||
std::error_code EC = Obj->getLibraryShortNameByIndex(Ordinal-1,
|
||||
DylibName);
|
||||
if (EC)
|
||||
return "<<ordinal too big>>";
|
||||
return DylibName;
|
||||
}
|
||||
}
|
||||
return "<<unknown special ordinal>>";
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
Loading…
Reference in New Issue
Block a user