mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-29 13:32:33 +00:00
llvm-symbolizer: skip leading underscore in Mach-O symbol table entries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185151 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c071f89a77
commit
8c6e3248e9
@ -32,9 +32,9 @@ CHECK-NEXT: dwarfdump-inl-test.cc:
|
||||
CHECK: _Z3do1v
|
||||
CHECK-NEXT: dwarfdump-test3-decl.h:7
|
||||
|
||||
CHECK: _main
|
||||
CHECK: __Z3inci
|
||||
CHECK: __Z3inci
|
||||
CHECK: main
|
||||
CHECK: _Z3inci
|
||||
CHECK: _Z3inci
|
||||
|
||||
RUN: echo "unexisting-file 0x1234" > %t.input2
|
||||
RUN: llvm-symbolizer < %t.input2
|
||||
|
@ -74,6 +74,9 @@ ModuleInfo::ModuleInfo(ObjectFile *Obj, DIContext *DICtx)
|
||||
StringRef SymbolName;
|
||||
if (error(si->getName(SymbolName)))
|
||||
continue;
|
||||
// Mach-O symbol table names have leading underscore, skip it.
|
||||
if (Module->isMachO() && SymbolName.size() > 0 && SymbolName[0] == '_')
|
||||
SymbolName = SymbolName.drop_front();
|
||||
// FIXME: If a function has alias, there are two entries in symbol table
|
||||
// with same address size. Make sure we choose the correct one.
|
||||
SymbolMapTy &M = SymbolType == SymbolRef::ST_Function ? Functions : Objects;
|
||||
|
Loading…
x
Reference in New Issue
Block a user