From a3f7db467370bffeccb9d387a6c2687e875a634a Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 4 Aug 2005 06:22:14 +0000 Subject: bfd/ * elf32-ppc.c (struct elf_linker_section): Replace sym_val field with sym. (ppc_elf_relocate_section): Adjust for above. (create_sdata_sym): New function. (ppc_elf_create_linker_section): Call it. (ppc_elf_check_relocs): Correct has_sda_refs and non_got_refs. Create sdata syms for all SDA relocs. (ppc_elf_adjust_dynamic_symbol): Don't special case _SDA_BASE_ and _SDA2_BASE_. (ppc_elf_set_sdata_syms): Delete. * elflink.c (bfd_elf_size_dynamic_sections): Don't create DT_INIT and DT_FINI tags unless associated section has input. (bfd_elf_set_symbol, _bfd_elf_provide_symbol): Delete. (_bfd_elf_provide_section_bound_symbols): Delete. * bfd-in.h (_bfd_elf_provide_symbol): Delete. (_bfd_elf_provide_section_bound_symbols): Delete. * bfd-in2.h: Regenerate. ld/ * ldemul.c (ldemul_do_assignments, do_assignments_default): Delete. * ldemul.h (ldemul_do_assignments, do_assignments_default): Delete. (struct ld_emulation_xfer_struct): Remove do_assignments field. * ldlang.c (lang_do_assignments): Don't call ldemul_do_assignments. * emulparams/elf32ppc.sh (SDATA_START_SYMBOLS): New. (SDATA2_START_SYMBOLS, SBSS_START_SYMBOLS, SBSS_END_SYMBOLS): New. * emultempl/aix.em (ld_*_emulation): Delete do_assignments init. * emultempl/armcoff.em: Likewise. * emultempl/beos.em: Likewise. * emultempl/generic.em: Likewise. * emultempl/gld960.em: Likewise. * emultempl/gld960c.em: Likewise. * emultempl/linux.em: Likewise. * emultempl/lnk960.em: Likewise. * emultempl/m68kcoff.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/sunos.em: Likewise. * emultempl/ticoff.em: Likewise. * emultempl/vanilla.em: Likewise. * emultempl/elf32.em: Likewise. (gld*_provide_bound_symbols): Delete. (gld*_provide_init_fini_syms): Delete. (gld*_before_allocation): Don't call ldemul_do_assignments. * emultempl/ppc32elf.em (ppc_do_assignments): Delete. (LDEMUL_DO_ASSIGNMENTS): Delete. * scripttempl/elf.sc: Provide init/fini syms. Add SBSS_START_SYMBOLS, SBSS_END_SYMBOLS, SDATA2_START_SYMBOLS. --- ld/emultempl/aix.em | 1 - ld/emultempl/armcoff.em | 1 - ld/emultempl/beos.em | 1 - ld/emultempl/elf32.em | 45 --------------------------------------------- ld/emultempl/generic.em | 1 - ld/emultempl/gld960.em | 1 - ld/emultempl/gld960c.em | 1 - ld/emultempl/linux.em | 1 - ld/emultempl/lnk960.em | 1 - ld/emultempl/m68kcoff.em | 1 - ld/emultempl/pe.em | 1 - ld/emultempl/ppc32elf.em | 18 ------------------ ld/emultempl/sunos.em | 1 - ld/emultempl/ticoff.em | 1 - ld/emultempl/vanilla.em | 1 - 15 files changed, 76 deletions(-) (limited to 'ld/emultempl') diff --git a/ld/emultempl/aix.em b/ld/emultempl/aix.em index 8763155b7e..d525edd890 100644 --- a/ld/emultempl/aix.em +++ b/ld/emultempl/aix.em @@ -1339,7 +1339,6 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation = { gld${EMULATION_NAME}_set_output_arch, gld${EMULATION_NAME}_choose_target, gld${EMULATION_NAME}_before_allocation, - do_assignments_default, gld${EMULATION_NAME}_get_script, "${EMULATION_NAME}", "${OUTPUT_FORMAT}", diff --git a/ld/emultempl/armcoff.em b/ld/emultempl/armcoff.em index acf117cb41..d5fd67d8ce 100644 --- a/ld/emultempl/armcoff.em +++ b/ld/emultempl/armcoff.em @@ -261,7 +261,6 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation = set_output_arch_default, ldemul_default_target, gld${EMULATION_NAME}_before_allocation, - do_assignments_default, gld${EMULATION_NAME}_get_script, "${EMULATION_NAME}", "${OUTPUT_FORMAT}", diff --git a/ld/emultempl/beos.em b/ld/emultempl/beos.em index e07677b314..0b06bc7420 100644 --- a/ld/emultempl/beos.em +++ b/ld/emultempl/beos.em @@ -766,7 +766,6 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation = set_output_arch_default, ldemul_default_target, gld_${EMULATION_NAME}_before_allocation, - do_assignments_default, gld_${EMULATION_NAME}_get_script, "${EMULATION_NAME}", "${OUTPUT_FORMAT}", diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index e43c8c5a83..2764a59d96 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -57,7 +57,6 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. /* Declare functions used by various EXTRA_EM_FILEs. */ static void gld${EMULATION_NAME}_before_parse (void); static void gld${EMULATION_NAME}_after_open (void); -static void gld${EMULATION_NAME}_provide_init_fini_syms (void); static void gld${EMULATION_NAME}_before_allocation (void); static bfd_boolean gld${EMULATION_NAME}_place_orphan (lang_input_statement_type *file, asection *s); @@ -1040,47 +1039,6 @@ if test x"$LDEMUL_BEFORE_ALLOCATION" != xgld"$EMULATION_NAME"_before_allocation; fi cat >>e${EMULATION_NAME}.c <creator)) - ppc_elf_set_sdata_syms (output_bfd, &link_info); - - s = bfd_get_section_by_name (output_bfd, ".sbss"); - _bfd_elf_provide_section_bound_symbols (&link_info, s, - "__sbss_start", "__sbss_end"); - _bfd_elf_provide_section_bound_symbols (&link_info, s, - "___sbss_start", "___sbss_end"); - - gld${EMULATION_NAME}_provide_init_fini_syms (); -} - EOF # Define some shell vars to insert bits of code into the standard elf @@ -177,4 +160,3 @@ PARSE_AND_LIST_ARGS_CASES=' # LDEMUL_AFTER_OPEN=ppc_after_open LDEMUL_BEFORE_ALLOCATION=ppc_before_allocation -LDEMUL_DO_ASSIGNMENTS=ppc_do_assignments diff --git a/ld/emultempl/sunos.em b/ld/emultempl/sunos.em index 19f18931c8..a480558c90 100644 --- a/ld/emultempl/sunos.em +++ b/ld/emultempl/sunos.em @@ -1013,7 +1013,6 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation = set_output_arch_default, ldemul_default_target, gld${EMULATION_NAME}_before_allocation, - do_assignments_default, gld${EMULATION_NAME}_get_script, "${EMULATION_NAME}", "${OUTPUT_FORMAT}", diff --git a/ld/emultempl/ticoff.em b/ld/emultempl/ticoff.em index 5938ba421e..0382bbdd86 100644 --- a/ld/emultempl/ticoff.em +++ b/ld/emultempl/ticoff.em @@ -162,7 +162,6 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation = set_output_arch_default, ldemul_default_target, before_allocation_default, - do_assignments_default, gld_${EMULATION_NAME}_get_script, "${EMULATION_NAME}", "${OUTPUT_FORMAT}", diff --git a/ld/emultempl/vanilla.em b/ld/emultempl/vanilla.em index ad11f41ddb..2124852687 100644 --- a/ld/emultempl/vanilla.em +++ b/ld/emultempl/vanilla.em @@ -65,7 +65,6 @@ struct ld_emulation_xfer_struct ld_vanilla_emulation = vanilla_set_output_arch, ldemul_default_target, before_allocation_default, - do_assignments_default, vanilla_get_script, "vanilla", "a.out-sunos-big", -- cgit v1.2.1