From e489d0aef709443ce63e0bb21e7eb18c9575d35c Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Thu, 1 Apr 2004 11:20:04 +0000 Subject: * bfd/bfd-in.h (bfd_elf32_arm_process_before_allocation): Update. * 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. * ld/emultempl/armelf.em (byteswap_code): Add. (arm_elf_before_allocation): Pass extra parameter. (PARSE_AND_LIST_PROLOGUE): Add OPTION_BE8. (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add be8. (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_BE8. * ld/emultempl/armelf_oabi.em: Pass extra parameter. * ld/ld.texinfo: Document --be8. --- ld/emultempl/armelf.em | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'ld/emultempl/armelf.em') diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em index 0c051ad..beeb40c 100644 --- a/ld/emultempl/armelf.em +++ b/ld/emultempl/armelf.em @@ -27,6 +27,7 @@ cat >>e${EMULATION_NAME}.c <the_bfd, & link_info, - no_pipeline_knowledge)) + no_pipeline_knowledge, + byteswap_code)) { /* xgettext:c-format */ einfo (_("Errors encountered processing file %s"), is->filename); @@ -184,6 +186,7 @@ EOF # PARSE_AND_LIST_PROLOGUE=' #define OPTION_THUMB_ENTRY 301 +#define OPTION_BE8 302 ' PARSE_AND_LIST_SHORTOPTS=p @@ -191,11 +194,13 @@ PARSE_AND_LIST_SHORTOPTS=p PARSE_AND_LIST_LONGOPTS=' { "no-pipeline-knowledge", no_argument, NULL, '\'p\''}, { "thumb-entry", required_argument, NULL, OPTION_THUMB_ENTRY}, + { "be8", no_argument, NULL, OPTION_BE8}, ' PARSE_AND_LIST_OPTIONS=' fprintf (file, _(" -p --no-pipeline-knowledge Stop the linker knowing about the pipeline length\n")); fprintf (file, _(" --thumb-entry= Set the entry point to be Thumb symbol \n")); + fprintf (file, _(" --be8 Oputput BE8 format image\n")); ' PARSE_AND_LIST_ARGS_CASES=' @@ -206,6 +211,10 @@ PARSE_AND_LIST_ARGS_CASES=' case OPTION_THUMB_ENTRY: thumb_entry_symbol = optarg; break; + + case OPTION_BE8: + byteswap_code = 1; + break; ' # We have our own after_open and before_allocation functions, but they call -- cgit v1.1