This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [marco.gidde@gatekeeper.pcc.de: wrong line numbers when debuggingshared libraries]


On 5 Apr 2000, Ian Lance Taylor wrote:

>    Date: Wed, 5 Apr 2000 07:51:20 -0700
>    From: "H . J . Lu" <hjl@lucon.org>
> 
>    It seems that "nm -l" doesn't work on shared libraries. But gdb is ok. 
>    Any ideas?
> 
> I think it is this old patch again:
> 
> 1998-12-10  Richard Henderson  <rth@cygnus.com>

Good guess.  Reverting the patch fixes the "nm -l" problem.  Now it's just
a matter of fixing the dwarf problem another way...

$ /usr/tmp/gas1/gas/as-new -o newbug.o bug.s
$ /usr/tmp/gas1/ld/ld-new -shared -o newlib.so newbug.o
$ nm -l newbug.o
0000001c t Letext       /usr/tmp/bug/bug.c:10
00000000 T foo_1        /usr/tmp/bug/bug.c:4
00000010 T foo_2        /usr/tmp/bug/bug.c:9
$ nm -l newlib.so
000002ec t Letext       /usr/tmp/bug/bug.c:10
000012f8 A _DYNAMIC
000012ec A _GLOBAL_OFFSET_TABLE_
00001328 A __bss_start
00001328 A _edata
00001328 A _end
000002ec A _etext
000002d0 T foo_1        /usr/tmp/bug/bug.c:4
000002e0 T foo_2        /usr/tmp/bug/bug.c:9

-- 
Linuxcare.  Support for the Revolution.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]