diff options
Diffstat (limited to 'contrib/binutils/ld/emultempl')
-rw-r--r-- | contrib/binutils/ld/emultempl/armcoff.em | 2 | ||||
-rw-r--r-- | contrib/binutils/ld/emultempl/armelf.em | 2 | ||||
-rw-r--r-- | contrib/binutils/ld/emultempl/armelf_oabi.em | 2 | ||||
-rw-r--r-- | contrib/binutils/ld/emultempl/elf32.em | 63 | ||||
-rw-r--r-- | contrib/binutils/ld/emultempl/generic.em | 2 | ||||
-rw-r--r-- | contrib/binutils/ld/emultempl/linux.em | 2 | ||||
-rw-r--r-- | contrib/binutils/ld/emultempl/pe.em | 5 | ||||
-rw-r--r-- | contrib/binutils/ld/emultempl/vanilla.em | 2 |
8 files changed, 36 insertions, 44 deletions
diff --git a/contrib/binutils/ld/emultempl/armcoff.em b/contrib/binutils/ld/emultempl/armcoff.em index 936da13..ab70843 100644 --- a/contrib/binutils/ld/emultempl/armcoff.em +++ b/contrib/binutils/ld/emultempl/armcoff.em @@ -4,7 +4,7 @@ cat >e${EMULATION_NAME}.c <<EOF /* This file is is generated by a shell script. DO NOT EDIT! */ /* emulate the original gld for the given ${EMULATION_NAME} - Copyright (C) 1991, 93, 96, 97, 98, 99, 2000 + Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. Written by Steve Chamberlain steve@cygnus.com diff --git a/contrib/binutils/ld/emultempl/armelf.em b/contrib/binutils/ld/emultempl/armelf.em index 3c82bce..0d1b8ed 100644 --- a/contrib/binutils/ld/emultempl/armelf.em +++ b/contrib/binutils/ld/emultempl/armelf.em @@ -1,5 +1,5 @@ # This shell script emits a C file. -*- C -*- -# Copyright (C) 1991, 93, 96, 97, 98, 99, 2000 +# Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000 # Free Software Foundation, Inc. # # This file is part of GLD, the Gnu Linker. diff --git a/contrib/binutils/ld/emultempl/armelf_oabi.em b/contrib/binutils/ld/emultempl/armelf_oabi.em index 7936d48..1f2deb38 100644 --- a/contrib/binutils/ld/emultempl/armelf_oabi.em +++ b/contrib/binutils/ld/emultempl/armelf_oabi.em @@ -4,7 +4,7 @@ cat >e${EMULATION_NAME}.c <<EOF /* This file is is generated by a shell script. DO NOT EDIT! */ /* emulate the original gld for the given ${EMULATION_NAME} - Copyright (C) 1991, 93, 96, 97, 98, 99, 2000 + Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. Written by Steve Chamberlain steve@cygnus.com diff --git a/contrib/binutils/ld/emultempl/elf32.em b/contrib/binutils/ld/emultempl/elf32.em index 9ac2d41..c0d52b1 100644 --- a/contrib/binutils/ld/emultempl/elf32.em +++ b/contrib/binutils/ld/emultempl/elf32.em @@ -7,7 +7,7 @@ cat >e${EMULATION_NAME}.c <<EOF /* This file is is generated by a shell script. DO NOT EDIT! */ /* ${ELFSIZE} bit ELF emulation code for ${EMULATION_NAME} - Copyright (C) 1991, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 + Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. Written by Steve Chamberlain <sac@cygnus.com> ELF support by Ian Lance Taylor <ian@cygnus.com> @@ -32,6 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "bfd.h" #include "sysdep.h" +#include "libiberty.h" #include <ctype.h> @@ -130,7 +131,7 @@ static void gld${EMULATION_NAME}_vercheck (s) lang_input_statement_type *s; { - const char *soname, *f; + const char *soname; struct bfd_link_needed_list *l; if (global_vercheck_failed) @@ -141,19 +142,13 @@ gld${EMULATION_NAME}_vercheck (s) soname = bfd_elf_get_dt_soname (s->the_bfd); if (soname == NULL) - soname = bfd_get_filename (s->the_bfd); - - f = strrchr (soname, '/'); - if (f != NULL) - ++f; - else - f = soname; + soname = basename (bfd_get_filename (s->the_bfd)); for (l = global_vercheck_needed; l != NULL; l = l->next) { const char *suffix; - if (strcmp (f, l->name) == 0) + if (strcmp (soname, l->name) == 0) { /* Probably can't happen, but it's an easy check. */ continue; @@ -168,7 +163,7 @@ gld${EMULATION_NAME}_vercheck (s) suffix += sizeof ".so." - 1; - if (strncmp (f, l->name, suffix - l->name) == 0) + if (strncmp (soname, l->name, suffix - l->name) == 0) { /* Here we know that S is a dynamic object FOO.SO.VER1, and the object we are considering needs a dynamic object @@ -192,7 +187,6 @@ gld${EMULATION_NAME}_stat_needed (s) struct stat st; const char *suffix; const char *soname; - const char *f; if (global_found) return; @@ -230,17 +224,12 @@ gld${EMULATION_NAME}_stat_needed (s) soname = bfd_elf_get_dt_soname (s->the_bfd); if (soname == NULL) - soname = s->filename; - - f = strrchr (soname, '/'); - if (f != NULL) - ++f; - else - f = soname; + soname = basename (s->filename); - if (strncmp (f, global_needed->name, suffix - global_needed->name) == 0) + if (strncmp (soname, global_needed->name, + suffix - global_needed->name) == 0) einfo ("%P: warning: %s, needed by %B, may conflict with %s\n", - global_needed->name, global_needed->by, f); + global_needed->name, global_needed->by, soname); } @@ -340,11 +329,7 @@ cat >>e${EMULATION_NAME}.c <<EOF einfo ("%F%P:%B: bfd_stat failed: %E\n", abfd); /* First strip off everything before the last '/'. */ - soname = strrchr (abfd->filename, '/'); - if (soname) - soname++; - else - soname = abfd->filename; + soname = basename (abfd->filename); if (trace_file_tries) info_msg (_("found %s at %s\n"), soname, name); @@ -949,20 +934,13 @@ gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry) if (bfd_check_format (entry->the_bfd, bfd_object) && (entry->the_bfd->flags & DYNAMIC) != 0) { - char *needed_name; - ASSERT (entry->is_archive && entry->search_dirs_flag); /* Rather than duplicating the logic above. Just use the - filename we recorded earlier. - - First strip off everything before the last '/'. */ - filename = strrchr (entry->filename, '/'); - filename++; + filename we recorded earlier. */ - needed_name = (char *) xmalloc (strlen (filename) + 1); - strcpy (needed_name, filename); - bfd_elf_set_dt_needed_name (entry->the_bfd, needed_name); + filename = xstrdup (basename (entry->filename)); + bfd_elf_set_dt_needed_name (entry->the_bfd, filename); } return true; @@ -1337,6 +1315,7 @@ cat >>e${EMULATION_NAME}.c <<EOF #define OPTION_DISABLE_NEW_DTAGS (400) #define OPTION_ENABLE_NEW_DTAGS (OPTION_DISABLE_NEW_DTAGS + 1) +#define OPTION_GROUP (OPTION_ENABLE_NEW_DTAGS + 1) static struct option longopts[] = { @@ -1350,6 +1329,8 @@ cat >>e${EMULATION_NAME}.c <<EOF {"disable-new-dtags", no_argument, NULL, OPTION_DISABLE_NEW_DTAGS}, {"enable-new-dtags", no_argument, NULL, OPTION_ENABLE_NEW_DTAGS}, {"enable-new-dtags", no_argument, NULL, OPTION_ENABLE_NEW_DTAGS}, + {"Bgroup", no_argument, NULL, OPTION_GROUP}, + {"Bgroup", no_argument, NULL, OPTION_GROUP}, EOF fi @@ -1408,6 +1389,12 @@ cat >>e${EMULATION_NAME}.c <<EOF link_info.new_dtags = true; break; + case OPTION_GROUP: + link_info.flags_1 |= (bfd_vma) DF_1_GROUP; + /* Groups must be self-contained. */ + link_info.no_undefined = true; + break; + case 'z': if (strcmp (optarg, "initfirst") == 0) link_info.flags_1 |= (bfd_vma) DF_1_INITFIRST; @@ -1433,6 +1420,8 @@ cat >>e${EMULATION_NAME}.c <<EOF link_info.flags |= (bfd_vma) DF_ORIGIN; link_info.flags_1 |= (bfd_vma) DF_1_ORIGIN; } + else if (strcmp (optarg, "defs") == 0) + link_info.no_undefined = true; /* What about the other Solaris -z options? FIXME. */ break; EOF @@ -1466,8 +1455,10 @@ EOF if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then cat >>e${EMULATION_NAME}.c <<EOF + fprintf (file, _(" -Bgroup\t\tSelects group name lookup rules for DSO\n")); fprintf (file, _(" --disable-new-dtags\tDisable new dynamic tags\n")); fprintf (file, _(" --enable-new-dtags\tEnable new dynamic tags\n")); + fprintf (file, _(" -z defs\t\tDisallows undefined symbols\n")); fprintf (file, _(" -z initfirst\t\tMark DSO to be initialized first at runtime\n")); fprintf (file, _(" -z interpose\t\tMark object to interpose all DSOs but executable\n")); fprintf (file, _(" -z loadfltr\t\tMark object requiring immediate process\n")); diff --git a/contrib/binutils/ld/emultempl/generic.em b/contrib/binutils/ld/emultempl/generic.em index f96323e..cb5c30c 100644 --- a/contrib/binutils/ld/emultempl/generic.em +++ b/contrib/binutils/ld/emultempl/generic.em @@ -4,7 +4,7 @@ cat >e${EMULATION_NAME}.c <<EOF /* This file is is generated by a shell script. DO NOT EDIT! */ /* emulate the original gld for the given ${EMULATION_NAME} - Copyright (C) 1991, 93, 94, 95, 96, 99, 2000 + Copyright 1991, 1992, 1994, 1996, 2000 Free Software Foundation, Inc. Written by Steve Chamberlain steve@cygnus.com diff --git a/contrib/binutils/ld/emultempl/linux.em b/contrib/binutils/ld/emultempl/linux.em index 31d816d..888a3dd 100644 --- a/contrib/binutils/ld/emultempl/linux.em +++ b/contrib/binutils/ld/emultempl/linux.em @@ -4,7 +4,7 @@ cat >e${EMULATION_NAME}.c <<EOF /* This file is is generated by a shell script. DO NOT EDIT! */ /* Linux a.out emulation code for ${EMULATION_NAME} - Copyright (C) 1991, 93, 94, 95, 96, 98, 99, 2000 + Copyright 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc. Written by Steve Chamberlain <sac@cygnus.com> Linux support by Eric Youngdale <ericy@cais.cais.com> diff --git a/contrib/binutils/ld/emultempl/pe.em b/contrib/binutils/ld/emultempl/pe.em index fcbf835..feab338 100644 --- a/contrib/binutils/ld/emultempl/pe.em +++ b/contrib/binutils/ld/emultempl/pe.em @@ -4,7 +4,8 @@ rm -f e${EMULATION_NAME}.c (echo;echo;echo;echo;echo)>e${EMULATION_NAME}.c # there, now line numbers match ;-) cat >>e${EMULATION_NAME}.c <<EOF /* This file is part of GLD, the Gnu Linker. - Copyright 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. + Copyright 1995, 1996, 1997, 1998, 1999, 2000 + Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -251,7 +252,7 @@ static definfo init[] = #endif D(MinorSubsystemVersion,"__minor_subsystem_version__", 0), D(Subsystem,"__subsystem__", ${SUBSYSTEM}), - D(SizeOfStackReserve,"__size_of_stack_reserve__", 0x2000000), + D(SizeOfStackReserve,"__size_of_stack_reserve__", 0x200000), D(SizeOfStackCommit,"__size_of_stack_commit__", 0x1000), D(SizeOfHeapReserve,"__size_of_heap_reserve__", 0x100000), D(SizeOfHeapCommit,"__size_of_heap_commit__", 0x1000), diff --git a/contrib/binutils/ld/emultempl/vanilla.em b/contrib/binutils/ld/emultempl/vanilla.em index c91d6ca..3e6aed9 100644 --- a/contrib/binutils/ld/emultempl/vanilla.em +++ b/contrib/binutils/ld/emultempl/vanilla.em @@ -2,7 +2,7 @@ # It does some substitutions. cat >e${EMULATION_NAME}.c <<EOF /* A vanilla emulation with no defaults - Copyright (C) 1991, 92, 93, 94, 2000 Free Software Foundation, Inc. + Copyright 1991, 1992, 1994, 2000 Free Software Foundation, Inc. Written by Steve Chamberlain steve@cygnus.com This file is part of GLD, the Gnu Linker. |