[PATCH] D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used
Alexey Lapshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 9 12:32:22 PDT 2019
avl added a comment.
> __libc_csu_init is in libc.a(elf-init.o) and has no debug info. It should symbolize to ?? but not_used.cpp is incorrectly returned. ?? -> not_used.cpp
I did not see that problem if this fix applied. Everything looks exactly like you expect:
nm res.out
0000000000201100 T __libc_csu_init
U __libc_start_main
00000000002010f0 T main
llvm-symbolizer -obj=res.o 0x0000000000201100
__libc_csu_init
??:0:0 <<<<<<<<<<<<<<<<<<<<<<<<<<<
llvm-symbolizer -obj=res.o 0x00000000002010f0
main
main.cpp:2:4 <<<<<<<<<<<<<<<<<<<<<<<<<<<
Did I correctly understand the problem which you are talking about?
> A more serious problem is when a main.cpp symbol incorrectly resolves to not_used.cpp. I created D60470 <https://reviews.llvm.org/D60470> to fix that.
Would solution from D60470 <https://reviews.llvm.org/D60470> work correctly for platform where 0 is a valid virtual address ?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59553/new/
https://reviews.llvm.org/D59553
More information about the llvm-commits
mailing list