[RISCV] Make empty name symbols SF_FormatSpecific so that llvm-symbolizer ignores...
authorFangrui Song <i@maskray.me>
Tue, 16 Mar 2021 21:12:18 +0000 (14:12 -0700)
committerFangrui Song <i@maskray.me>
Tue, 16 Mar 2021 21:12:18 +0000 (14:12 -0700)
commit5d037458a318db4a15a7732513ab7d88bde04dc6
treee65d2e3a228462586373bedf077a19a8e80bcd5e
parentf5e6182ce6cd16080c62f6c8d599c09971904150
[RISCV] Make empty name symbols SF_FormatSpecific so that llvm-symbolizer ignores them for symbolization

On RISC-V, clang emits empty name symbols used for label differences. (In GCC the symbols are typically `.L0`)
After D95916, the empty name symbols can show up in llvm-symbolizer's symbolization output.
They have no names and thus not useful. Set `SF_FormatSpecific` so that llvm-symbolizer will ignore them.

`SF_FormatSpecific` is also used in LTO but that case should not matter.

Corresponding addr2line problem: https://sourceware.org/bugzilla/show_bug.cgi?id=27585

Reviewed By: luismarques

Differential Revision: https://reviews.llvm.org/D98669
llvm/include/llvm/Object/ELFObjectFile.h
llvm/test/DebugInfo/Symbolize/ELF/riscv-empty-name-symbol.s [new file with mode: 0644]