aboutsummaryrefslogtreecommitdiff
path: root/ld/emulparams
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-07-07 21:23:53 +0930
committerAlan Modra <amodra@gmail.com>2018-07-10 23:59:07 +0930
commit1594e052d4fec8690b6bfabd369bc030135eb91a (patch)
treedad7c02446a7687637a68214defa1a109b42cdf9 /ld/emulparams
parent624940689a97573ed1e24ae054dcb2fd6906f557 (diff)
downloadgdb-1594e052d4fec8690b6bfabd369bc030135eb91a.zip
gdb-1594e052d4fec8690b6bfabd369bc030135eb91a.tar.gz
gdb-1594e052d4fec8690b6bfabd369bc030135eb91a.tar.bz2
xgate cleanup
elf32-xgate.c contains many functions that are only stubs and elf32-xgate.h contains unused declarations. While this might be reasonable for the initial commit of a port with subsequent work fleshing out the stubs, xgate has only had two minor target specific patches since the initial commit over six years ago. The rest of the changes have been general maintenance work applied to all ELF targets, and some of this work could have been avoided if the stubs hadn't been there. So this patch removes all the stubs. I've kept the functionality of the old elf32_xgate_add_symbol_hook, implemented in elf32_xgate_backend_symbol_processing. Presumably, that's to set the symbol st_target_internal flag for use in elf32-m68hc1x.c:elf32_m68hc11_relocate_section. The empty elf32_xgate_relocate_section meant that xgate had no linker. Or at least, no linker relocation processing. Deleting the elf_backend_relocate_section define means the target will now use the generic linker reloc processing. How good that is will depend on the accuracy of the reloc howtos.. I haven't updated the ld testsuite to xfail tests expected to fail for generic elf targets. bfd/ * elf32-xgate.h: Delete. * elf32-xgate.c: Delete unnecessary forward declarations, add two that are now needed. (xgate_elf_bfd_link_hash_table_create) (xgate_elf_bfd_link_hash_table_free) (xgate_elf_set_mach_from_flags, struct xgate_scan_param) (stub_hash_newfunc, elf32_xgate_add_symbol_hook) (elf32_xgate_setup_section_lists, elf32_xgate_size_stubs) (elf32_xgate_build_stubs, elf32_xgate_check_relocs) (elf32_xgate_relocate_section, _bfd_xgate_elf_set_private_flags) (elf32_xgate_post_process_headers): Delete. (elf32_xgate_backend_symbol_processing): New function. (xgate_elf_ignore_reloc, xgate_elf_special_reloc) (_bfd_xgate_elf_print_private_bfd_data): Make static. (ELF_TARGET_ID, elf_info_to_howto, elf_backend_check_relocs) (elf_backend_relocate_section, elf_backend_object_p) (elf_backend_final_write_processing, elf_backend_can_gc_sections) (elf_backend_post_process_headers, elf_backend_add_symbol_hook) (bfd_elf32_bfd_link_hash_table_create) (bfd_elf32_bfd_set_private_flags) (xgate_stub_hash_lookup): Don't define. (elf_backend_symbol_processing): Define. * elf-bfd.h (elf_target_id): Delete XGATE_ELF_DATA. ld/ * emulparams/xgateelf.sh (TEMPLATE_NAME) Set to generic. (EXTRA_EM_FILE): Set to genelf.
Diffstat (limited to 'ld/emulparams')
-rw-r--r--ld/emulparams/xgateelf.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/ld/emulparams/xgateelf.sh b/ld/emulparams/xgateelf.sh
index 1f9253e..fa2e60a 100644
--- a/ld/emulparams/xgateelf.sh
+++ b/ld/emulparams/xgateelf.sh
@@ -1,4 +1,6 @@
MACHINE=
+TEMPLATE_NAME=generic
+EXTRA_EM_FILE=genelf
SCRIPT_NAME=elfxgate
OUTPUT_FORMAT="elf32-xgate"
ROM_START_ADDR=0x08000
@@ -14,5 +16,3 @@ ARCH=xgate
MAXPAGESIZE=32
EMBEDDED=yes
GENERIC_BOARD=no
-TEMPLATE_NAME=elf32
-EXTRA_EM_FILE=