mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
DebugInfo/Symbolize: Exclude ARM mapping symbols for .symtab symbolization after D95916
Their names don't convey much information, so they should be excluded. The behavior matches addr2line. Differential Revision: https://reviews.llvm.org/D96617
This commit is contained in:
parent
2571f5980f
commit
1fad034c68
@ -174,6 +174,11 @@ Error SymbolizableObjectFile::addSymbol(const SymbolRef &Symbol,
|
||||
if (Type != ELF::STT_NOTYPE && Type != ELF::STT_FUNC &&
|
||||
Type != ELF::STT_OBJECT && Type != ELF::STT_GNU_IFUNC)
|
||||
return Error::success();
|
||||
// Some STT_NOTYPE symbols are not desired. This excludes STT_SECTION and
|
||||
// ARM mapping symbols.
|
||||
uint32_t Flags = cantFail(Symbol.getFlags());
|
||||
if (Flags & SymbolRef::SF_FormatSpecific)
|
||||
return Error::success();
|
||||
} else if (SymbolType != SymbolRef::ST_Function &&
|
||||
SymbolType != SymbolRef::ST_Data) {
|
||||
return Error::success();
|
||||
|
19
test/DebugInfo/Symbolize/ELF/arm-mapping-symbol.s
Normal file
19
test/DebugInfo/Symbolize/ELF/arm-mapping-symbol.s
Normal file
@ -0,0 +1,19 @@
|
||||
# REQUIRES: arm-registered-target
|
||||
## Ignore ARM mapping symbols (with a prefix of $a, $d or $t).
|
||||
|
||||
# RUN: llvm-mc -filetype=obj -triple=armv7-none-linux %s -o %t
|
||||
# RUN: llvm-symbolizer --obj=%t 4 8 | FileCheck %s
|
||||
# RUN: llvm-mc -filetype=obj -triple=thumbv7-none-linux %s -o %tthumb
|
||||
# RUN: llvm-symbolizer --obj=%tthumb 4 8 | FileCheck %s
|
||||
|
||||
# CHECK: foo
|
||||
# CHECK-NEXT: ??:0:0
|
||||
# CHECK-EMPTY:
|
||||
# CHECK-NEXT: foo
|
||||
# CHECK-NEXT: ??:0:0
|
||||
|
||||
.globl foo
|
||||
foo:
|
||||
.word 32
|
||||
nop
|
||||
.word 32
|
Loading…
x
Reference in New Issue
Block a user