aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.h
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2004-04-01 12:32:35 +0000
committerPaul Brook <paul@codesourcery.com>2004-04-01 12:32:35 +0000
commit93204d3a0b545e3d60aab40f933fcb3bdf929b81 (patch)
tree46de24097e29a8c54deb1a00fde7f513ec91c674 /bfd/elf32-arm.h
parent2de41bce0f95dde45a8a66aeb535732e09e3a262 (diff)
downloadgdb-93204d3a0b545e3d60aab40f933fcb3bdf929b81.zip
gdb-93204d3a0b545e3d60aab40f933fcb3bdf929b81.tar.gz
gdb-93204d3a0b545e3d60aab40f933fcb3bdf929b81.tar.bz2
This time the version of the patch that works.
* bfd/elf32-arm.h (struct elf32_elf_section_map): New. (struct _arm_elf_section_data): New. (elf32_arm_section_data): Define. (struct elf32_arm_link_hash_table): Add byteswap_code. (elf32_arm_link_hash_table_create): Initialize byteswap_code. (bfd_elf32_arm_process_before_allocation): Add byteswap_code. (elf32_arm_post_process_headers): Set EF_ARM_BE8. (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook, elf32_arm_compare_mapping, elf32_arm_write_section): New functions. (bfd_elf32_new_section_hook, elf_backend_write_section, elf_backend_link_output_symbol_hook): Define.
Diffstat (limited to 'bfd/elf32-arm.h')
-rw-r--r--bfd/elf32-arm.h11
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;
}