aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorThiemo Seufer <ths@networkno.de>2003-10-08 17:36:19 +0000
committerThiemo Seufer <ths@networkno.de>2003-10-08 17:36:19 +0000
commit6a69177919136af5407c4eb3145bf1bbbf06d1c2 (patch)
treed9427d24c7fdea3694de07c501ffea4cff5a1487 /bfd
parent05da4302188949f1752cb1fa5def4b010450dbe4 (diff)
downloadfsf-binutils-gdb-6a69177919136af5407c4eb3145bf1bbbf06d1c2.zip
fsf-binutils-gdb-6a69177919136af5407c4eb3145bf1bbbf06d1c2.tar.gz
fsf-binutils-gdb-6a69177919136af5407c4eb3145bf1bbbf06d1c2.tar.bz2
* elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
for non-SGI N64 ABI. Improve code consitency.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elfxx-mips.c13
2 files changed, 13 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index fee0a01..cd1afeb 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
+ for non-SGI N64 ABI. Improve code consitency.
+
2003-10-07 Alexandre Oliva <aoliva@redhat.com>
* 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 fa57295..d28b537 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