diff options
author | Alan Modra <amodra@gmail.com> | 2003-02-04 14:51:35 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2003-02-04 14:51:35 +0000 |
commit | e0468e59ad8adedb96443dc4ea280a7b4cd35463 (patch) | |
tree | 26578ff38f97c385b25fe091ed08d358fabdabcc /ld | |
parent | cdba85ecf422aceb1beb63492b5ee1d669952f08 (diff) | |
download | gdb-e0468e59ad8adedb96443dc4ea280a7b4cd35463.zip gdb-e0468e59ad8adedb96443dc4ea280a7b4cd35463.tar.gz gdb-e0468e59ad8adedb96443dc4ea280a7b4cd35463.tar.bz2 |
* emultempl/ppc64elf.em (ppc_before_allocation): Size sections then
call ppc64_elf_tls_optimize.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 5 | ||||
-rw-r--r-- | ld/emultempl/ppc64elf.em | 15 |
2 files changed, 19 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index adca7f2..3510293 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -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 diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em index 185a590..29bfbe6 100644 --- a/ld/emultempl/ppc64elf.em +++ b/ld/emultempl/ppc64elf.em @@ -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 |