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: RFH/RFC: symbol index overflow in MIPS linker stubs...


David Daney <ddaney@avtrex.com> writes:
> I think we could easily change the stubs so that they used ori (an 
> unsigned immediate load), instead of li.  This would work for symbol 
> tables of size up to 2^16.
>
> FWIW: I tested this theory by hand editing the stubs to use the unsigned 
> immediate load and the library now runs correctly.
>
> A second option might be to use a two instruction sequence to load t8, 
> but that would change the size of the stubs.  I don't know if that would 
> be portable or possible.

I'm with Daniel (if I've understood him correctly): I think it _is_
worth going the extra mile and only using the longer stubs if the
largest dynindx requires it.  We know when calculating the size of
the stub section what the maximum dynindx should be, so we can select
between the 16- and 20-byte stubs at the same time.  We can then record
the chosen size in mips_elf_link_hash_table.

I'm a little worried that using longer stubs might confuse the native
IRIX tools, but I no longer have access to IRIX, so I can't check.
I don't think that's a problem for the cases that really need it --
what else can we do? -- but I think it is one reason to prefer the
traditional stubs when possible.

All FWIW.

Richard


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