[PATCH] MIPS gas: irix relocation tweaks

Stan Cox scox@redhat.com
Mon Sep 9 20:49:00 GMT 2002


This patch changes gas so it creates relocations that are more like those of
Irix for the Newabi.  The primary differences are:
1. use R_MIPS_GOT_DISP for internal and external symbols
2. use R_MIPS_GOT_PAGE/R_MIPS_GOT_OFFSET for internal function symbols
3. make -xgot optional and not the default

Tested on Irix and mips-elf.

	* tc-mips.c (load_address): Use BFD_RELOC_MIPS_GOT_DISP for newabi.
	(macro): Likewise for la.  Likewise for ld.
	(mips_after_parse_args): Make -xgot optional, not the default.
	(md_apply_fix3): Allow composite relocation to set up gp.
	(tc_gen_reloc): Allow relaxing for newabi.
	Relax R_MIPS_CALL16 to R_MIPS_GOT_PAGE/R_MIPS_GOT_OFST if local.
	Relax R_MIPS_GOT16/R_MIPS_LO16 to R_MIPS_GOT_DISP if local.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ,tc-mips.patch
Type: text/x-patch
Size: 9219 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20020909/3c1bf84d/attachment.bin>


More information about the Binutils mailing list