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.
This commit is contained in:
Paul Brook 2004-04-01 12:32:35 +00:00
parent 2de41bce0f
commit 93204d3a0b
1 changed files with 7 additions and 4 deletions

View File

@ -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;
}