Apply Bruno de Bus's patch to record the ARM mapping symbol state on a per-
[deliverable/binutils-gdb.git] / bfd / elf32-arm.h
index b9e3debd6062fb519a63ae542c09d5adf2fb4502..39864d427c4f0b2591fe7b700432d753a9187406 100644 (file)
@@ -1767,6 +1767,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
        return bfd_reloc_ok;
       }
 
+#ifndef OLD_ARM_ABI
     case R_ARM_ALU_PCREL7_0:
     case R_ARM_ALU_PCREL15_8:
     case R_ARM_ALU_PCREL23_15:
@@ -1791,6 +1792,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
        bfd_put_32 (input_bfd, value, hit_data);
       }
       return bfd_reloc_ok;
+#endif
 
     case R_ARM_GNU_VTINHERIT:
     case R_ARM_GNU_VTENTRY:
@@ -4091,9 +4093,12 @@ elf32_arm_post_process_headers (abfd, link_info)
   i_ehdrp->e_ident[EI_OSABI]      = ARM_ELF_OS_ABI_VERSION;
   i_ehdrp->e_ident[EI_ABIVERSION] = ARM_ELF_ABI_VERSION;
 
-  globals = elf32_arm_hash_table (link_info);
-  if (globals->byteswap_code)
-    i_ehdrp->e_flags |= EF_ARM_BE8;
+  if (link_info)
+    {
+      globals = elf32_arm_hash_table (link_info);
+      if (globals->byteswap_code)
+       i_ehdrp->e_flags |= EF_ARM_BE8;
+    }
 }
 
 static enum elf_reloc_type_class
@@ -4275,7 +4280,7 @@ elf32_arm_write_section (bfd *output_bfd ATTRIBUTE_UNUSED, asection *sec,
        }
       ptr = end;
     }
-  bfd_free (map);
+  free (map);
   return FALSE;
 }
 
This page took 0.024021 seconds and 4 git commands to generate.