RFH/RFC: symbol index overflow in MIPS linker stubs...

Richard Sandiford richard@codesourcery.com
Thu Jun 8 18:44:00 GMT 2006


David Daney <ddaney@avtrex.com> writes:
> Richard Sandiford wrote:
>> David Daney <ddaney@avtrex.com> writes:
>> 
>>>There are three ways to do this:
>>>
>>>1) Always use a 20 byte stub.  This allows for up to 2^31 - 1 dynamic 
>>>symbols.  You are concerned that this would break IRIX tools.
>> 
>> 
>> Well, "would"'s a bit a too strong.  It's only a vague "might".
>> It's o32 I'm particularly worried about: the o32 IRIX tools
>> are a bit weird.
>> 
>> That wouldn't be much of an argument if it wasn't fairly easy
>> to do #2 or #3, of course, but it does look fairly easy.
>> 
>
> My main concern is that in _bfd_mips_elf_adjust_dynamic_symbol I need to 
> know the size of the stub, but I am uncertain if we will know the number 
> of dynamic symbols at this point so that we can choose the proper stub size.

AIUI, _bfd_mips_elf_adjust_dynamic_symbol is called after
_bfd_mips_elf_always_size_sections (see bfd_elf_size_dynamic_sections)
so I think we're OK there.

Richard



More information about the Binutils mailing list