mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-04 21:31:03 +00:00
[llvm-objdump] Update error message and add test case for mach-o file with bad library ordinals
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219746 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2bddd7cf65
commit
1a0afd82b1
BIN
test/tools/llvm-objdump/Inputs/bad-ordinal.macho-x86_64
Executable file
BIN
test/tools/llvm-objdump/Inputs/bad-ordinal.macho-x86_64
Executable file
Binary file not shown.
6
test/tools/llvm-objdump/macho-bad-ordinal.test
Normal file
6
test/tools/llvm-objdump/macho-bad-ordinal.test
Normal file
@ -0,0 +1,6 @@
|
||||
# RUN: llvm-objdump -macho -bind -lazy-bind %p/Inputs/bad-ordinal.macho-x86_64 \
|
||||
# RUN: | FileCheck %s
|
||||
|
||||
|
||||
# CHECK: __DATA __nl_symbol_ptr 0x100001000 pointer 0 <<bad library ordinal>> dyld_stub_binder
|
||||
# CHECK: __DATA __la_symbol_ptr 0x100001010 <<bad library ordinal>> _printf
|
@ -2802,7 +2802,7 @@ static StringRef ordinalName(const object::MachOObjectFile *Obj, int Ordinal) {
|
||||
std::error_code EC = Obj->getLibraryShortNameByIndex(Ordinal-1,
|
||||
DylibName);
|
||||
if (EC)
|
||||
return "<<ordinal too big>>";
|
||||
return "<<bad library ordinal>>";
|
||||
return DylibName;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user