aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/elf32.em3
-rw-r--r--ld/emultempl/ppc32elf.em19
2 files changed, 15 insertions, 7 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 3899a02..b04d624 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -57,6 +57,7 @@ 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);
@@ -1097,7 +1098,7 @@ gld${EMULATION_NAME}_before_allocation (void)
referred to by dynamic objects. */
lang_for_each_statement (gld${EMULATION_NAME}_find_statement_assignment);
- gld${EMULATION_NAME}_provide_init_fini_syms ();
+ ldemul_do_assignments ();
/* Let the ELF backend work out the sizes of any sections required
by dynamic linking. */
diff --git a/ld/emultempl/ppc32elf.em b/ld/emultempl/ppc32elf.em
index 9a64da2..ba59b80 100644
--- a/ld/emultempl/ppc32elf.em
+++ b/ld/emultempl/ppc32elf.em
@@ -118,13 +118,20 @@ ppc_before_allocation (void)
}
static void
-gld${EMULATION_NAME}_after_allocation (void)
+ppc_do_assignments (void)
{
+ asection *s;
+
if (is_ppc_elf32_vec (link_info.hash->creator))
- {
- if (!ppc_elf_set_sdata_syms (output_bfd, &link_info))
- einfo ("%X%P: cannot set sdata syms %E\n");
- }
+ 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
@@ -170,4 +177,4 @@ PARSE_AND_LIST_ARGS_CASES='
#
LDEMUL_AFTER_OPEN=ppc_after_open
LDEMUL_BEFORE_ALLOCATION=ppc_before_allocation
-LDEMUL_AFTER_ALLOCATION=gld${EMULATION_NAME}_after_allocation
+LDEMUL_DO_ASSIGNMENTS=ppc_do_assignments