------- Additional Comments From hjl at lucon dot org 2005-06-04 14:18 ------- It has nothing to do with "ld -r". The problem is "nm -l" doesn't work well on .o file:
# nm -l t1.o 00000000 T main /user/hjl/bugs/binutils/debug/t1.c:5 00000000 D test1_v1 /user/hjl/bugs/binutils/debug/t1.c:5 -> should be 1 00000004 D test1_v2 /user/hjl/bugs/binutils/debug/t1.c:5 -> should be 2 00000008 D test1_v3 /user/hjl/bugs/binutils/debug/t1.c:5 -> should be 3 nm uses bfd_find_nearest_line to find line number. It is address based and doesn't work well on data symbols in relocatable file where data and text sections can have same addreses. We need something like bfd_find_nearest_line_by_symbol. -- What |Removed |Added ---------------------------------------------------------------------------- CC| |hjl at lucon dot org Summary|debug symbols error |"nm -l" doesn't work well on | |data symbols in relocatable | |files http://sources.redhat.com/bugzilla/show_bug.cgi?id=990 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils