diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/elf32-arm.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h index b9e3deb..d3f8d1f 100644 --- a/bfd/elf32-arm.h +++ b/bfd/elf32-arm.h @@ -4091,9 +4091,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 +4278,7 @@ elf32_arm_write_section (bfd *output_bfd ATTRIBUTE_UNUSED, asection *sec, } ptr = end; } - bfd_free (map); + free (map); return FALSE; } |