Committing MIPS -mno-shared patch

David Daney ddaney@avtrex.com
Wed Mar 2 22:29:00 GMT 2005


Ian Lance Taylor wrote:
> This is the patch I am committing to add support for the -mno-shared
> option to the MIPS target.
> 
> Ian
> 
> gas/ChangeLog:
> 2004-12-10  Ian Lance Taylor  <ian@wasabisystems.com>
> 
> 	* config/tc-mips.c (mips_in_shared): New static variable.
> 	(macro_build_lui): Permit "_gp" if !mips_in_shared.
> 	(md_longopts): Add -mshared and -mno-shared.
> 	(md_parse_option): Handle OPTION_MSHARED and OPTION_MNO_SHARED.
> 	(s_cpload): Implement !mips_in_shared case.
> 	(s_cpsetup): Likewise.
> 	* doc/c-mips.texi (MIPS Opts): Document -mno-shared.
> 	* NEWS: Mention -mno-shared.
> 
> gas/testsuite/ChangeLog:
> 2004-12-10  Ian Lance Taylor  <ian@wasabisystems.com>
> 
> 	* gas/mips/elf-rel23a.d: New test.
> 	* gas/mips/elf-rel23b.d: New test.
> 	* gas/mips/elf-rel25.s: New test.
> 	* gas/mips/elf-rel25.d: New test.
> 	* gas/mips/elf-rel25a.d: New test.
> 	* gas/mips/mips.exp: Run new tests.
> 
> 
FYI:

-mno-shared appears to be broken on o32 LE for large programs.

I have a large program composed of about 250,000 lines of code in about 
1000 source files (mostly java but with some C and C++ thrown in for 
good measure).  Linking of this program causes the linker to create 
multiple GOTs.

When building with -Wa,-mno-shared there is some as of yet undetermined 
problem with the resulting executable preventing it from running.

Without -Wa,-mno-shared there are no problems.

David Daney.



More information about the Binutils mailing list