1c1
< # $FreeBSD: head/contrib/binutils/ld/emultempl/elf32.em 77319 2001-05-28 06:21:27Z obrien $
---
> # $FreeBSD: head/contrib/binutils/ld/emultempl/elf32.em 78841 2001-06-26 17:57:37Z obrien $
13c13
< Copyright (C) 1991, 93, 94, 95, 96, 97, 98, 99, 2000, 2001
---
> Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
37a38
> #include "libiberty.h"
136c137
< const char *soname, *f;
---
> const char *soname;
147c148
< soname = bfd_get_filename (s->the_bfd);
---
> soname = basename (bfd_get_filename (s->the_bfd));
149,154d149
< f = strrchr (soname, '/');
< if (f != NULL)
< ++f;
< else
< f = soname;
<
159c154
< if (strcmp (f, l->name) == 0)
---
> if (strcmp (soname, l->name) == 0)
174c169
< if (strncmp (f, l->name, suffix - l->name) == 0)
---
> if (strncmp (soname, l->name, suffix - l->name) == 0)
198d192
< const char *f;
236c230
< soname = s->filename;
---
> soname = basename (s->filename);
238,244c232,233
< f = strrchr (soname, '/');
< if (f != NULL)
< ++f;
< else
< f = soname;
<
< if (strncmp (f, global_needed->name, suffix - global_needed->name) == 0)
---
> if (strncmp (soname, global_needed->name,
> suffix - global_needed->name) == 0)
246c235
< global_needed->name, global_needed->by, f);
---
> global_needed->name, global_needed->by, soname);
346,350c335
< soname = strrchr (abfd->filename, '/');
< if (soname)
< soname++;
< else
< soname = abfd->filename;
---
> soname = basename (abfd->filename);
1023,1024d1007
< char *needed_name;
<
1028c1011
< filename we recorded earlier.
---
> filename we recorded earlier. */
1030,1036c1013,1014
< First strip off everything before the last '/'. */
< filename = strrchr (entry->filename, '/');
< filename++;
<
< 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);
1410a1389
> #define OPTION_GROUP (OPTION_ENABLE_NEW_DTAGS + 1)
1423a1403,1404
> {"Bgroup", no_argument, NULL, OPTION_GROUP},
> {"Bgroup", no_argument, NULL, OPTION_GROUP},
1481a1463,1468
> case OPTION_GROUP:
> link_info.flags_1 |= (bfd_vma) DF_1_GROUP;
> /* Groups must be self-contained. */
> link_info.no_undefined = true;
> break;
>
1506a1494,1495
> else if (strcmp (optarg, "defs") == 0)
> link_info.no_undefined = true;
1539a1529
> fprintf (file, _(" -Bgroup\t\tSelects group name lookup rules for DSO\n"));
1541a1532
> fprintf (file, _(" -z defs\t\tDisallows undefined symbols\n"));
< # $FreeBSD: head/contrib/binutils/ld/emultempl/elf32.em 77319 2001-05-28 06:21:27Z obrien $
---
> # $FreeBSD: head/contrib/binutils/ld/emultempl/elf32.em 78841 2001-06-26 17:57:37Z obrien $
13c13
< Copyright (C) 1991, 93, 94, 95, 96, 97, 98, 99, 2000, 2001
---
> Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
37a38
> #include "libiberty.h"
136c137
< const char *soname, *f;
---
> const char *soname;
147c148
< soname = bfd_get_filename (s->the_bfd);
---
> soname = basename (bfd_get_filename (s->the_bfd));
149,154d149
< f = strrchr (soname, '/');
< if (f != NULL)
< ++f;
< else
< f = soname;
<
159c154
< if (strcmp (f, l->name) == 0)
---
> if (strcmp (soname, l->name) == 0)
174c169
< if (strncmp (f, l->name, suffix - l->name) == 0)
---
> if (strncmp (soname, l->name, suffix - l->name) == 0)
198d192
< const char *f;
236c230
< soname = s->filename;
---
> soname = basename (s->filename);
238,244c232,233
< f = strrchr (soname, '/');
< if (f != NULL)
< ++f;
< else
< f = soname;
<
< if (strncmp (f, global_needed->name, suffix - global_needed->name) == 0)
---
> if (strncmp (soname, global_needed->name,
> suffix - global_needed->name) == 0)
246c235
< global_needed->name, global_needed->by, f);
---
> global_needed->name, global_needed->by, soname);
346,350c335
< soname = strrchr (abfd->filename, '/');
< if (soname)
< soname++;
< else
< soname = abfd->filename;
---
> soname = basename (abfd->filename);
1023,1024d1007
< char *needed_name;
<
1028c1011
< filename we recorded earlier.
---
> filename we recorded earlier. */
1030,1036c1013,1014
< First strip off everything before the last '/'. */
< filename = strrchr (entry->filename, '/');
< filename++;
<
< 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);
1410a1389
> #define OPTION_GROUP (OPTION_ENABLE_NEW_DTAGS + 1)
1423a1403,1404
> {"Bgroup", no_argument, NULL, OPTION_GROUP},
> {"Bgroup", no_argument, NULL, OPTION_GROUP},
1481a1463,1468
> case OPTION_GROUP:
> link_info.flags_1 |= (bfd_vma) DF_1_GROUP;
> /* Groups must be self-contained. */
> link_info.no_undefined = true;
> break;
>
1506a1494,1495
> else if (strcmp (optarg, "defs") == 0)
> link_info.no_undefined = true;
1539a1529
> fprintf (file, _(" -Bgroup\t\tSelects group name lookup rules for DSO\n"));
1541a1532
> fprintf (file, _(" -z defs\t\tDisallows undefined symbols\n"));