Date: Sat, 16 Mar 2002 10:15:47 -0800 From: "David O'Brien" <obrien@freebsd.org> To: freebsd-current@freebsd.org Subject: [PATCH] please test this patch to `ld' with your ports Message-ID: <20020316101547.A77095@dragon.nuxi.com>
next in thread | raw e-mail | index | archive | help
This may fix some of the linking and crashing problems. It does fix the ports/editors/vim linking problem. I am *quite* irritated that I tried to get this patch committed into the FSF CVS repo back in July 2001, but it got bikesheded to death. :-( -- -- David (obrien@FreeBSD.org) Index: contrib/binutils/ld/emultempl/elf32.em =================================================================== RCS file: /home/ncvs/src/contrib/binutils/ld/emultempl/elf32.em,v retrieving revision 1.10 diff -u -r1.10 elf32.em --- contrib/binutils/ld/emultempl/elf32.em 22 Feb 2002 04:52:00 -0000 1.10 +++ contrib/binutils/ld/emultempl/elf32.em 16 Mar 2002 18:08:06 -0000 @@ -168,7 +168,7 @@ soname = bfd_elf_get_dt_soname (s->the_bfd); if (soname == NULL) - soname = basename (bfd_get_filename (s->the_bfd)); + soname = lbasename (bfd_get_filename (s->the_bfd)); for (l = global_vercheck_needed; l != NULL; l = l->next) { @@ -250,7 +250,7 @@ soname = bfd_elf_get_dt_soname (s->the_bfd); if (soname == NULL) - soname = basename (s->filename); + soname = lbasename (s->filename); if (strncmp (soname, global_needed->name, suffix - global_needed->name) == 0) einfo ("%P: warning: %s, needed by %B, may conflict with %s\n", @@ -354,7 +354,7 @@ einfo ("%F%P:%B: bfd_stat failed: %E\n", abfd); /* First strip off everything before the last '/'. */ - soname = basename (abfd->filename); + soname = lbasename (abfd->filename); if (trace_file_tries) info_msg (_("found %s at %s\n"), soname, name); @@ -372,9 +372,6 @@ DT_NEEDED entry for this file. */ bfd_elf_set_dt_needed_name (abfd, ""); - /* Previos basename call was clobbered in lang_for_each_input_file. */ - soname = basename (abfd->filename); - /* Tell the ELF backend that the output file needs a DT_NEEDED entry for this file if it is used to resolve the reference in a regular object. */ @@ -1047,7 +1044,7 @@ /* Rather than duplicating the logic above. Just use the filename we recorded earlier. */ - filename = xstrdup (basename (entry->filename)); + filename = lbasename (entry->filename); bfd_elf_set_dt_needed_name (entry->the_bfd, filename); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020316101547.A77095>