PATCH: ld/2338: objdump -d -l doesn't work correctly

Eric Botcazou ebotcazou@adacore.com
Mon Feb 20 21:35:00 GMT 2006


> Do you have a binutils testcase to show there is a problem with
> _bfd_dwarf2_find_nearest_line and -ffunction-sections? I'd like to
> fix it if possible.

Attached.  Compile with "-g -o t t.c" and "-g -ffunction-sections -o t t.c".


Before your patch:

t.o: In function `foo1':/home/eric/build/binutils/native/t.c:6: warning: the 
use of `tmpnam' is dangerous, better use `mkstemp'

t.o: In function `foo2':/home/eric/build/binutils/native/t.c:17: warning: the 
use of `tmpnam' is dangerous, better use `mkstemp'

so clearly bogus message with -ffunction-sections.


With your patch:

t.o: In function `foo1':/home/eric/build/binutils/native/t.c:6: warning: the 
use of `tmpnam' is dangerous, better use `mkstemp'

t.o: In function `foo1':t.c:(.text.foo1+0xe): warning: the use of `tmpnam' is 
dangerous, better use `mkstemp'

so no more bogus message but no source location either.

-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.c
Type: text/x-csrc
Size: 172 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20060220/4d0589f9/attachment.bin>


More information about the Binutils mailing list