diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 8 | ||||
-rw-r--r-- | ld/emultempl/ppc64elf.em | 7 | ||||
-rw-r--r-- | ld/ldlang.c | 22 |
3 files changed, 13 insertions, 24 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 372422d..64e6a08 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,11 @@ +2008-01-15 Alan Modra <amodra@bigpond.net.au> + + PR 5604 + * ldlang.c (lang_gc_sections): Move code to set SEC_KEEP on entry + syms to _bfd_elf_gc_keep. + * emultempl/ppc64elf.em (ppc_before_allocation): Don't call + ppc64_elf_edit_opd if no_opd_opt. + 2008-01-11 Tristan Gingold <gingold@adacore.com> Eric Botcazou <ebotcazou@adacore.com> diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em index d5578c3..b23ae43 100644 --- a/ld/emultempl/ppc64elf.em +++ b/ld/emultempl/ppc64elf.em @@ -1,5 +1,6 @@ # This shell script emits a C file. -*- C -*- -# Copyright 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. +# Copyright 2002, 2003, 2004, 2005, 2007, 2008 +# Free Software Foundation, Inc. # # This file is part of the GNU Binutils. # @@ -103,8 +104,8 @@ ppc_before_allocation (void) { if (stub_file != NULL) { - if (!ppc64_elf_edit_opd (output_bfd, &link_info, no_opd_opt, - non_overlapping_opd)) + if (!no_opd_opt + && !ppc64_elf_edit_opd (output_bfd, &link_info, non_overlapping_opd)) einfo ("%X%P: can not edit %s %E\n", "opd"); if (ppc64_elf_tls_setup (output_bfd, &link_info) && !no_tls_opt) diff --git a/ld/ldlang.c b/ld/ldlang.c index 63326e5..ec5f000 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -1,6 +1,6 @@ /* Linker command language support. Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, - 2001, 2002, 2003, 2004, 2005, 2006, 2007 + 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This file is part of the GNU Binutils. @@ -5670,30 +5670,10 @@ lang_gc_sections_1 (lang_statement_union_type *s) static void lang_gc_sections (void) { - struct bfd_link_hash_entry *h; - ldlang_undef_chain_list_type *ulist; - /* Keep all sections so marked in the link script. */ lang_gc_sections_1 (statement_list.head); - /* Keep all sections containing symbols undefined on the command-line, - and the section containing the entry symbol. */ - - for (ulist = link_info.gc_sym_list; ulist; ulist = ulist->next) - { - h = bfd_link_hash_lookup (link_info.hash, ulist->name, - FALSE, FALSE, FALSE); - - if (h != NULL - && (h->type == bfd_link_hash_defined - || h->type == bfd_link_hash_defweak) - && ! bfd_is_abs_section (h->u.def.section)) - { - h->u.def.section->flags |= SEC_KEEP; - } - } - /* SEC_EXCLUDE is ignored when doing a relocatable link, except in the special case of debug info. (See bfd/stabs.c) Twiddle the flag here, to simplify later linker code. */ |