aboutsummaryrefslogtreecommitdiff
path: root/clang/lib
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2024-04-24 16:25:45 -0700
committerFangrui Song <i@maskray.me>2024-04-24 16:25:45 -0700
commitb9f2c16b50f68c978e90190f46a7c0db3f39e98c (patch)
tree44d67b06eefd8a17ebca6ebc2c5360c7167a63ea /clang/lib
parent4c8ec8f8bc3fb4dda4fd36c3b2ad745bd3451970 (diff)
downloadllvm-b9f2c16b50f68c978e90190f46a7c0db3f39e98c.zip
llvm-b9f2c16b50f68c978e90190f46a7c0db3f39e98c.tar.gz
llvm-b9f2c16b50f68c978e90190f46a7c0db3f39e98c.tar.bz2
[MC] Rename temporary symbols of empty name to ".L0 " (#89693)
Temporary symbols generated for .eh_frame and .debug_line have an empty name, which appear in .symtab in the presence of RISC-V style linker relaxation and will not be discarded by ld/objcopy --discard-locals (-X). In contrast, GNU assembler's riscv port assigns a fake name ".L0 " (with a trailing space) to these symbols so that will be discarded by ld/objcopy --discard-locals. This patch matches the GNU behavior. Since Clang's RISC-V targets pass -X to ld, and GNU ld defaults to -X for RISC-V targets, these ".L0 " symbols will be discarded after linking by default, as expected by users. The llvm-symbolizer special case for RISC-V `SF_FormatSpecific` symbols https://reviews.llvm.org/D98669 needs to be adjusted. Note: `"":` in assembly currently crashes.
Diffstat (limited to 'clang/lib')
0 files changed, 0 insertions, 0 deletions