[PATCH] Change MIPS linker stubs to allow for more than 2^15 symbols.

David Daney ddaney@avtrex.com
Wed Jun 7 23:58:00 GMT 2006


As noted in this thread:

http://sourceware.org/ml/binutils/2006-06/msg00086.html

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.  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.

Tested with a mipsel-linux cross build running on i686-pc-linux-gnu with 
no regressions in the testsuite.

Perhaps someone with a mips64 system could test there, as this patch 
effects that architecture as well.

Comments?

OK to commit?

How about to the 2.17 branch?

David Daney

bfd:
2006-06-07  David Daney  <ddaney@avtrex.com>

	* elfxx-mips.c (STUB_LI16): Made non sign extending.
	(STUB_LUI): New macro.
	(MIPS_FUNCTION_STUB_SIZE): Increased to 20.
	(_bfd_mips_elf_finish_dynamic_symbol): Changed stub generation
	to allow larger symbol table indexes.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mips-stubs.diff.txt
URL: <https://sourceware.org/pipermail/binutils/attachments/20060607/fa176ecf/attachment.txt>


More information about the Binutils mailing list