diff options
author | Alexey Samsonov <samsonov@google.com> | 2013-06-28 14:25:52 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2013-06-28 14:25:52 +0000 |
commit | 8c6e3248e90605f0ff7249a9727fe46e79297b25 (patch) | |
tree | f7291e91e413afa3592486665abbbf84d6688b93 /tools/llvm-symbolizer | |
parent | c071f89a770d6c66e6b29fdf013fa88454fc0ac6 (diff) | |
download | external_llvm-8c6e3248e90605f0ff7249a9727fe46e79297b25.zip external_llvm-8c6e3248e90605f0ff7249a9727fe46e79297b25.tar.gz external_llvm-8c6e3248e90605f0ff7249a9727fe46e79297b25.tar.bz2 |
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
Diffstat (limited to 'tools/llvm-symbolizer')
-rw-r--r-- | tools/llvm-symbolizer/LLVMSymbolize.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/llvm-symbolizer/LLVMSymbolize.cpp b/tools/llvm-symbolizer/LLVMSymbolize.cpp index dfcbacf..5956416 100644 --- a/tools/llvm-symbolizer/LLVMSymbolize.cpp +++ b/tools/llvm-symbolizer/LLVMSymbolize.cpp @@ -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; |