diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2003-04-09 02:55:40 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2003-04-09 02:55:40 +0000 |
commit | 69931e601363c9ac1d7dc3fcd6c91e16282c3f8a (patch) | |
tree | 37b3f5261ef375abb6b5067466720e4d88e75753 /bfd/elf32-mips.c | |
parent | 27abff5434a042f784420121a52d5a4b51902df7 (diff) | |
download | gdb-69931e601363c9ac1d7dc3fcd6c91e16282c3f8a.zip gdb-69931e601363c9ac1d7dc3fcd6c91e16282c3f8a.tar.gz gdb-69931e601363c9ac1d7dc3fcd6c91e16282c3f8a.tar.bz2 |
* elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
pointer size from ABI, not arch_bits_per_address.
Diffstat (limited to 'bfd/elf32-mips.c')
-rw-r--r-- | bfd/elf32-mips.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c index 1399f00..adf057b 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; |