Rename elf32.em to elf.em
[deliverable/binutils-gdb.git] / ld / emultempl / ppc32elf.em
index 77143e753e5bb825b9bb2e26a0fe28c99a21dcbf..056068edb1989bd85fda0663912edf7d9751984c 100644 (file)
@@ -19,7 +19,7 @@
 # MA 02110-1301, USA.
 #
 
-# This file is sourced from elf32.em, and defines extra powerpc32-elf
+# This file is sourced from elf.em, and defines extra powerpc32-elf
 # specific routines.
 #
 fragment <<EOF
@@ -79,7 +79,7 @@ ppc_after_check_relocs (void)
 
       num_got = 0;
       num_plt = 0;
-      for (os = &lang_output_section_statement.head->output_section_statement;
+      for (os = &lang_os_list.head->output_section_statement;
           os != NULL;
           os = os->next)
        {
@@ -171,7 +171,12 @@ ppc_before_allocation (void)
       bfd_vma high = 0;
       asection *o;
 
-      /* Run lang_size_sections (if not already done).  */
+      /* Run lang_size_sections even if already done, so as to pick
+        up gld${EMULATION_NAME}_before_allocation sizing.  This
+        matters when we have an executable bss plt which will
+        typically be laid out near the end of the image, ie. worst
+        case for branches at the start of .text.  */
+      expld.phase = lang_first_phase_enum;
       prelim_size_sections ();
 
       for (o = link_info.output_bfd->sections; o != NULL; o = o->next)
@@ -242,7 +247,6 @@ if grep -q 'ld_elf32_spu_emulation' ldemul-list.h; then
   fragment <<EOF
 /* Special handling for embedded SPU executables.  */
 extern bfd_boolean embedded_spu_file (lang_input_statement_type *, const char *);
-static bfd_boolean gld${EMULATION_NAME}_load_symbols (lang_input_statement_type *);
 
 static bfd_boolean
 ppc_recognized_file (lang_input_statement_type *entry)
@@ -250,7 +254,7 @@ ppc_recognized_file (lang_input_statement_type *entry)
   if (embedded_spu_file (entry, "-m32"))
     return TRUE;
 
-  return gld${EMULATION_NAME}_load_symbols (entry);
+  return ldelf_load_symbols (entry);
 }
 
 EOF
This page took 0.025693 seconds and 4 git commands to generate.