diff options
Diffstat (limited to 'ld/emultempl')
-rw-r--r-- | ld/emultempl/aix.em | 5 | ||||
-rw-r--r-- | ld/emultempl/armcoff.em | 5 | ||||
-rw-r--r-- | ld/emultempl/beos.em | 3 | ||||
-rw-r--r-- | ld/emultempl/elf32.em | 7 | ||||
-rw-r--r-- | ld/emultempl/linux.em | 4 | ||||
-rw-r--r-- | ld/emultempl/lnk960.em | 7 | ||||
-rw-r--r-- | ld/emultempl/m68kcoff.em | 2 | ||||
-rw-r--r-- | ld/emultempl/pe.em | 3 | ||||
-rw-r--r-- | ld/emultempl/sunos.em | 2 |
9 files changed, 28 insertions, 10 deletions
diff --git a/ld/emultempl/aix.em b/ld/emultempl/aix.em index c37cadf..480a3c6 100644 --- a/ld/emultempl/aix.em +++ b/ld/emultempl/aix.em @@ -10,7 +10,7 @@ cat >e${EMULATION_NAME}.c <<EOF /* AIX emulation code for ${EMULATION_NAME} Copyright 1991, 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004 + 2003, 2004, 2005 Free Software Foundation, Inc. Written by Steve Chamberlain <sac@cygnus.com> AIX support by Ian Lance Taylor <ian@cygnus.com> @@ -787,6 +787,9 @@ gld${EMULATION_NAME}_before_allocation (void) &is->header.next); } } + + if (!link_info.relocatable) + strip_excluded_output_sections (); } static char * diff --git a/ld/emultempl/armcoff.em b/ld/emultempl/armcoff.em index 468c3b0..3dc8ee0 100644 --- a/ld/emultempl/armcoff.em +++ b/ld/emultempl/armcoff.em @@ -5,7 +5,7 @@ cat >e${EMULATION_NAME}.c <<EOF /* emulate the original gld for the given ${EMULATION_NAME} Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, - 2004 Free Software Foundation, Inc. + 2004, 2005 Free Software Foundation, Inc. Written by Steve Chamberlain steve@cygnus.com This file is part of GLD, the Gnu Linker. @@ -125,6 +125,9 @@ gld${EMULATION_NAME}_before_allocation (void) /* We have seen it all. Allocate it, and carry on */ bfd_arm_allocate_interworking_sections (& link_info); + + if (!link_info.relocatable) + strip_excluded_output_sections (); } static void diff --git a/ld/emultempl/beos.em b/ld/emultempl/beos.em index 679fd81..2d4491f 100644 --- a/ld/emultempl/beos.em +++ b/ld/emultempl/beos.em @@ -661,6 +661,9 @@ gld_${EMULATION_NAME}_before_allocation (void) #endif /* TARGET_IS_ppcpe */ sort_sections (stat_ptr->head); + + if (!link_info.relocatable) + strip_excluded_output_sections (); } /* Place an orphan section. We use this to put sections with a '\$' in them diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index 2e1dac1..641cd63 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -1069,6 +1069,7 @@ gld${EMULATION_NAME}_before_allocation (void) (const char * const *) command_line.auxiliary_filters, &link_info, &sinterp, lang_elf_version_info))) einfo ("%P%F: failed to set dynamic section sizes: %E\n"); + ${ELF_INTERPRETER_SET_DEFAULT} /* Let the user override the dynamic linker we are using. */ if (command_line.interpreter != NULL @@ -1125,6 +1126,12 @@ ${ELF_INTERPRETER_SET_DEFAULT} s->flags |= SEC_EXCLUDE; } } + + if (!link_info.relocatable) + strip_excluded_output_sections (); + + if (!bfd_elf_size_dynsym_hash_dynstr (output_bfd, &link_info)) + einfo ("%P%F: failed to set dynamic section sizes: %E\n"); } EOF diff --git a/ld/emultempl/linux.em b/ld/emultempl/linux.em index 0d2dc5d..32a445c 100644 --- a/ld/emultempl/linux.em +++ b/ld/emultempl/linux.em @@ -10,7 +10,7 @@ cat >e${EMULATION_NAME}.c <<EOF /* Linux a.out emulation code for ${EMULATION_NAME} Copyright 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, - 2003, 2004 Free Software Foundation, Inc. + 2003, 2004, 2005 Free Software Foundation, Inc. Written by Steve Chamberlain <sac@cygnus.com> Linux support by Eric Youngdale <ericy@cais.cais.com> @@ -121,6 +121,8 @@ gld${EMULATION_NAME}_before_allocation (void) dynamic linking. */ if (! bfd_${EMULATION_NAME}_size_dynamic_sections (output_bfd, &link_info)) einfo ("%P%F: failed to set dynamic section sizes: %E\n"); + + strip_excluded_output_sections (); } static char * diff --git a/ld/emultempl/lnk960.em b/ld/emultempl/lnk960.em index 7d9176e..b58efcc 100644 --- a/ld/emultempl/lnk960.em +++ b/ld/emultempl/lnk960.em @@ -130,11 +130,6 @@ lnk960_after_parse (void) } static void -lnk960_before_allocation (void) -{ -} - -static void lnk960_after_allocation (void) { if (!link_info.relocatable) @@ -273,7 +268,7 @@ struct ld_emulation_xfer_struct ld_lnk960_emulation = lnk960_after_allocation, lnk960_set_output_arch, lnk960_choose_target, - lnk960_before_allocation, + before_allocation_default, lnk960_get_script, "lnk960", "", diff --git a/ld/emultempl/m68kcoff.em b/ld/emultempl/m68kcoff.em index ba251c1..2d04ead 100644 --- a/ld/emultempl/m68kcoff.em +++ b/ld/emultempl/m68kcoff.em @@ -4,7 +4,7 @@ cat >e${EMULATION_NAME}.c <<EOF /* This file is is generated by a shell script. DO NOT EDIT! */ /* Handle embedded relocs for m68k. - Copyright 2000, 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Written by Michael Sokolov <msokolov@ivan.Harhan.ORG>, based on generic.em by Steve Chamberlain <steve@cygnus.com>, embedded relocs code based on mipsecoff.em by Ian Lance Taylor <ian@cygnus.com>. diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index 16cc437..f2b5c03 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -1287,6 +1287,9 @@ gld_${EMULATION_NAME}_before_allocation (void) /* We have seen it all. Allocate it, and carry on. */ bfd_arm_pe_allocate_interworking_sections (& link_info); #endif /* TARGET_IS_armpe */ + + if (!link_info.relocatable) + strip_excluded_output_sections (); } #ifdef DLL_SUPPORT diff --git a/ld/emultempl/sunos.em b/ld/emultempl/sunos.em index a84959f..f5595dd 100644 --- a/ld/emultempl/sunos.em +++ b/ld/emultempl/sunos.em @@ -809,6 +809,8 @@ gld${EMULATION_NAME}_before_allocation (void) hdyn->u.def.section = sdyn; else hdyn->u.def.section = bfd_abs_section_ptr; + + strip_excluded_output_sections (); } } |