Extracted from https://reviews.llvm.org/D95916#2627640 This may be related to PR27584. echo 'void _start() {}' > a.c # Make sure riscv64-linux-gnu-bfd is in PATH. clang --target=riscv64-linux-gnu -fuse-ld=bfd -nostdlib -fasynchronous-unwind-tables a.c ~/Dev/binutils-gdb/out/riscv64/binutils/addr2line -fe a.out $(nm a.out | awk '/ _start/{printf "%#x",strtonum("0x"$1)+4}') ?? a.c:? '??' is less useful. addr2line probably should return '_start' instead. arm addr2line has logic ignoring $a/$d/$t. In the absence of DWARF line number information, addr2line uses .symtab to do symbolization. clang -fasynchronous-unwind-tables causes empty name symbols for label differences. This should be reproduceable with GCC .L0 symbols as well.
The fixed in PR27584 doesn't affect the PR27585. The addr2line may be another problem and need to find another way to fix.