From owner-freebsd-current Sat Mar 16 10:17:10 2002 Delivered-To: freebsd-current@freebsd.org Received: from dragon.nuxi.com (trang.nuxi.com [66.92.13.169]) by hub.freebsd.org (Postfix) with ESMTP id C77A237B404 for ; Sat, 16 Mar 2002 10:17:02 -0800 (PST) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.12.2/8.12.2) with ESMTP id g2GIH2lv086426 for ; Sat, 16 Mar 2002 10:17:02 -0800 (PST) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.12.2/8.12.2/Submit) id g2GIFlVl086416 for freebsd-current@freebsd.org; Sat, 16 Mar 2002 10:15:47 -0800 (PST) Date: Sat, 16 Mar 2002 10:15:47 -0800 From: "David O'Brien" To: freebsd-current@freebsd.org Subject: [PATCH] please test this patch to `ld' with your ports Message-ID: <20020316101547.A77095@dragon.nuxi.com> Reply-To: obrien@freebsd.org Mail-Followup-To: freebsd-current@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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