This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

Re: Patch: Fix elf_find_function () on a corner case


On 11/23/05, Jan Beulich <JBeulich@novell.com> wrote:
> >ld: warning: cannot find entry symbol _start; defaulting to 08048094
> >t.o: In function `aaa':b.c:(.text+0x7): undefined reference to `bar'
> >t.o: In function `bbb':b.c:(.text+0x17): undefined reference to `bar'
>
> I wouldn't want to loose the information on the source file, if that
> information is available. This makes finding the function easier, and in
> case of local functions or multiply defined (weak) ones disambiguates
> their origin.
>
In this case, the best information we want is:

t.o: In function `aaa':a.c:(.text+0x7): undefined reference to `bar'
t.o: In function `bbb':b.c:(.text+0x17): undefined reference to `bar'

However, ld cannot give out such information since t.o was got by 'ld
-r' from a.o and b.o. There are two FILE symbols in t.o. For global
symbols like aaa and bbb, elf_find_function () cannot find their
files. The best thing it can do is not output misleading (wrong)
source file information.

> >While we expect it to output:
> >
> >ld: warning: cannot find entry symbol _start; defaulting to 08048094
> >t.o: In function `aaa': undefined reference to `bar'
> >t.o: In function `bbb': undefined reference to `bar'
>

Jie


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