[PATCH] D95916: DebugInfo/Symbolize: Allow STT_NOTYPE/STT_GNU_IFUNC symbols for .symtab symbolization

Luís Marques via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 15 15:23:51 PDT 2021


luismarques added a comment.

This broke debug info for RISC-V. Test case with broken symbolization:

  $ cat test.c
  void _start() {}
  $ clang --target=riscv64 --gcc-toolchain=<path> -nostdlib -g test.c
  $ addr=$((0x`readelf -Ws a.out | grep " _start" | awk '{print $2}'` + 4))
  $ hexaddr=`printf '%x\n' $addr`
  $ r=`llvm-addr2line -f -e a.out $hexaddr | head -n 1`
  [ -z "$r" ] && echo "bad" || echo "good"

Apologies for the terrible shell script, it was the most expedient thing I could come up with.
That test case as written needs the GNU toolchain because LLD will complain about the `R_RISCV_ALIGN` relaxation relocation, and using `-mno-relax` breaks the test.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95916/new/

https://reviews.llvm.org/D95916



More information about the llvm-commits mailing list