This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: ld/2338: objdump -d -l doesn't work correctly
On Mon, Feb 20, 2006 at 06:55:15PM +0100, Eric Botcazou wrote:
> > 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.
>
_bfd_dwarf2_find_nearest_line can't tell the line number when more
than one lines have the same address. I will see if I can implement
Dan's approach when I find the time.
H.J.