* elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
[deliverable/binutils-gdb.git] / bfd / elf32-mips.c
index 1399f0031287e52d0d722c21b7b1af68be67b3f2..85819d55d3d52fbf5bc19565ee48d76cb4683edd 100644 (file)
@@ -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;
@@ -1715,7 +1716,7 @@ bfd_mips_elf32_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
     }
 
   /* Get a copy of the native relocations.  */
-  internal_relocs = (_bfd_elf32_link_read_relocs
+  internal_relocs = (_bfd_elf_link_read_relocs
                     (abfd, datasec, (PTR) NULL, (Elf_Internal_Rela *) NULL,
                      info->keep_memory));
   if (internal_relocs == NULL)
This page took 0.023962 seconds and 4 git commands to generate.