This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] Change MIPS linker stubs to allow for more than 2^15 symbols.
David Daney wrote:
> Thiemo Seufer wrote:
> >David Daney wrote:
> >>As noted in this thread:
> >>The mips linker would not reliably allow for more than 2^15 dynamic
> >>symbols. This prevents GCC's libgcj java runtime library from being
> >>correctly linked.
> >>The consensus was to increase the size of the linker stubs by one
> >>instruction so that objects with many dynamic symbols could be supported.
> >>I increased the size of the stub from 16 to 20 bytes.
> >It may be useful to use 24 bytes, this adheres to the ABI alignment
> >rule of 2^3.
> Which rule would that be? Is there such a requirement for function
> entry points?
Apparently I misremembered and there is no such rule.
> >>The new stubs
> >>support up to 2^31 dynamic symbols. That should be enough for at least
> >>the short term. With the patch applied I can now successfully build and
> >>run libgcj from a recent GCC-4.2 snapshot on mipsel-linux.
> >Hm, 2^32 symbols would nicely fit the maximum for NewABI.
> I don't know mips64 well enough to know how to load an unsigned 32 bit
> constant. So It had to be 2^31.
It would need one more instruction, so it is relatively expensive.
> >>*** 8013,8027 ****
> >> MIPS_ELF_STUB_SECTION_NAME (dynobj));
> >> BFD_ASSERT (s != NULL);
> >>- /* FIXME: Can h->dynindx be more than 64K? */
> >>- if (h->dynindx & 0xffff0000)
> >>- return FALSE;
> >When it is 2^31, shoudn't we continue to test for overflow?
> Probably, but I got lazy.
Please add it back. :-)