Index: test/DebugInfo/llvm-symbolizer.test =================================================================== --- test/DebugInfo/llvm-symbolizer.test +++ test/DebugInfo/llvm-symbolizer.test @@ -60,9 +60,11 @@ RUN: echo "0x400559" > %t.input4 RUN: echo "0x400436" >> %t.input4 +RUN: echo "0x400510" >> %t.input4 RUN: llvm-symbolizer --obj %p/Inputs/dwarfdump-test.elf-x86-64 < %t.input4 \ RUN: | FileCheck %s --check-prefix=BINARY BINARY: main BINARY-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16 BINARY: _start +BINARY: f Index: tools/llvm-symbolizer/LLVMSymbolize.cpp =================================================================== --- tools/llvm-symbolizer/LLVMSymbolize.cpp +++ tools/llvm-symbolizer/LLVMSymbolize.cpp @@ -423,6 +423,8 @@ std::string LLVMSymbolizer::DemangleName(const std::string &Name) { #if !defined(_MSC_VER) + if (Name.substr(0, 2) != "_Z") + return Name; int status = 0; char *DemangledName = __cxa_demangle(Name.c_str(), 0, 0, &status); if (status != 0)