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: Can objdump show friendly symbolic function name?


Daniel Jacobowitz <dan@codesourcery.com> writes:
> On Tue, Jul 20, 2010 at 06:32:36PM +0100, Maciej W. Rozycki wrote:
>> > That is not the case.
>> > 
>> > Case in point (before multi-got bugs were fixed), I had reliably working on
>> > mipsel-linux (o32):
>> > 
>> > Application: no -mxgot
>> > libc.so.6/libpthread.so.???: no -mxgot
>> > other .so files: no -mxgot.
>> > libgcj.so.???: -mxgot.
>> > 
>> > 
>> > As far as I know, you can mix -mxgot and non -mxgot executables and shared
>> > objects.
>> 
>>  So what was the fuss about when Mozilla (or whatever monstrous program 
>> that was) failed to compile with standard GOT one day then?  Why didn't 
>> they simply build whatever the failing object was with -mxgot and the 
>> multi-GOT scheme was added to binutils instead?  It looks to me like an 
>> overkill solution was chosen, so surely there must have been a reason.
>
> Everything linked in to the executable has to use -mxgot - or you have
> to be lucky.  The usual problem was that one of crtbegin or crtend
> would have a GOT reference that ended up out of range.  That's all I
> remember, though.

Right.  The problem is that the way the linker orders the GOT isn't
easily predictable.  What you want in the ideal world is for all GOT
entries that only referenced by {GOT,CALL}_{HI,LO}16 relocs to come
after all those that are referenced using single 16-bit relocs like GOT16.
But at the moment, that's not always the case, and an arbitrary symbol
referenced by a 16-bit reloc could be placed after several symbols that
aren't.

This should now be relatively straightforward to fix, but I never got
around to it.  See:

   http://sourceware.org/ml/binutils/2008-06/msg00274.html

for a sketch of one possible approach (and still my preferred one).

Richard


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