From: Thiemo Seufer Date: Wed, 8 Oct 2003 17:36:19 +0000 (+0000) Subject: * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6a69177919136af5407c4eb3145bf1bbbf06d1c2;p=binutils-gdb.git * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code for non-SGI N64 ABI. Improve code consitency. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index fee0a01b430..cd1afeb488d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2003-10-08 Thiemo Seufer + + * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code + for non-SGI N64 ABI. Improve code consitency. + 2003-10-07 Alexandre Oliva * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index fa572958d47..d28b537c211 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -587,17 +587,20 @@ static bfd *reldyn_sorting_bfd; offsets from $gp. */ #define MIPS_ELF_GOT_MAX_SIZE(abfd) (ELF_MIPS_GP_OFFSET(abfd) + 0x7fff) -/* Instructions which appear in a stub. For some reason the stub is - slightly different on an SGI system. */ +/* Instructions which appear in a stub. */ #define STUB_LW(abfd) \ ((ABI_64_P (abfd) \ ? 0xdf998010 /* ld t9,0x8010(gp) */ \ : 0x8f998010)) /* lw t9,0x8010(gp) */ #define STUB_MOVE(abfd) \ - (SGI_COMPAT (abfd) ? 0x03e07825 : 0x03e07821) /* move t7,ra */ -#define STUB_JALR 0x0320f809 /* jal t9 */ + ((ABI_64_P (abfd) \ + ? 0x03e0782d /* daddu t7,ra */ \ + : 0x03e07821)) /* addu t7,ra */ +#define STUB_JALR 0x0320f809 /* jalr t9,ra */ #define STUB_LI16(abfd) \ - (SGI_COMPAT (abfd) ? 0x34180000 : 0x24180000) /* ori t8,zero,0 */ + ((ABI_64_P (abfd) \ + ? 0x64180000 /* daddiu t8,zero,0 */ \ + : 0x24180000)) /* addiu t8,zero,0 */ #define MIPS_FUNCTION_STUB_SIZE (16) /* The name of the dynamic interpreter. This is put in the .interp