* emultempl/ppc64elf.em (ppc_before_allocation): Size sections then
authorAlan Modra <amodra@gmail.com>
Tue, 4 Feb 2003 14:51:35 +0000 (14:51 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 4 Feb 2003 14:51:35 +0000 (14:51 +0000)
call ppc64_elf_tls_optimize.

ld/ChangeLog
ld/emultempl/ppc64elf.em

index adca7f201f65a46b0758e0bd15ed8d08f33b422e..35102935519ebc0f79cbca77a5566495aa117565 100644 (file)
@@ -1,3 +1,8 @@
+2003-02-05  Alan Modra  <amodra@bigpond.net.au>
+
+       * emultempl/ppc64elf.em (ppc_before_allocation): Size sections then
+       call ppc64_elf_tls_optimize.
+
 2003-02-03  Daniel Jacobowitz  <drow@mvista.com>
 
        * emultempl/elf32.em: Move gld${EMULATION_NAME}_add_sysroot
index 185a5907ccabc60d901ed1fc2eea467ac39c86d2..29bfbe601cca3c672b65ff705e5c3063513569c1 100644 (file)
@@ -1,5 +1,5 @@
 # This shell script emits a C file. -*- C -*-
-#   Copyright 2002 Free Software Foundation, Inc.
+#   Copyright 2002, 2003 Free Software Foundation, Inc.
 #
 # This file is part of GLD, the Gnu Linker.
 #
@@ -101,7 +101,20 @@ ppc_before_allocation ()
       return;
     }
 
+  /* Size the sections.  This is premature, but we want to know the
+     TLS segment layout so that certain optimizations can be done.  */
+  lang_size_sections (stat_ptr->head, abs_output_section,
+                     &stat_ptr->head, 0, (bfd_vma) 0, NULL);
+
+  if (!ppc64_elf_tls_optimize (output_bfd, &link_info))
+    {
+      einfo ("%X%P: TLS problem %E\n");
+      return;
+    }
+
   gld${EMULATION_NAME}_before_allocation ();
+
+  lang_reset_memory_regions ();
 }
 
 struct hook_stub_info
This page took 0.028678 seconds and 4 git commands to generate.