summaryrefslogtreecommitdiff
path: root/bfd/elf32-mips.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-04-10 21:33:55 +0000
committerAndrew Cagney <cagney@redhat.com>2003-04-10 21:33:55 +0000
commit28aa72da4ce487bb98d2004bf36f7dbcef6ecc89 (patch)
treeb1c3032c23eb7c3288334c5fb8d7c796a3c0542c /bfd/elf32-mips.c
parentf46a289cb18f363f41a4bef398dff60eb615a744 (diff)
downloadbinutils-gdb-cagney_frameaddr-20030403-branch.tar.gz
Diffstat (limited to 'bfd/elf32-mips.c')
-rw-r--r--bfd/elf32-mips.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index 1399f003128..adf057b40d2 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -1440,11 +1440,12 @@ bfd_elf32_bfd_reloc_type_lookup (abfd, code)
case BFD_RELOC_CTOR:
/* We need to handle BFD_RELOC_CTOR specially.
Select the right relocation (R_MIPS_32 or R_MIPS_64) based on the
- size of addresses on this architecture. */
- if (bfd_arch_bits_per_address (abfd) == 32)
- return &howto_table[(int) R_MIPS_32];
- else
+ size of addresses of the ABI. */
+ if ((elf_elfheader (abfd)->e_flags & (E_MIPS_ABI_O64
+ | E_MIPS_ABI_EABI64)) != 0)
return &elf_mips_ctor64_howto;
+ else
+ return &howto_table[(int) R_MIPS_32];
case BFD_RELOC_MIPS16_JMP:
return &elf_mips16_jump_howto;