[PATCH] basename buffer gets spammed in `ld'
David O'Brien
obrien@FreeBSD.org
Mon Jul 9 16:37:00 GMT 2001
There is a bug in `ld' that causes it to record crtn.o as a shared
library dependency in some cases on FreeBSD.
Permission to apply to head and 2.11 branch?
--
-- David (obrien@FreeBSD.org)
Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/ld/ChangeLog,v
retrieving revision 1.423
diff -u -r1.423 ChangeLog
--- ChangeLog 2001/07/03 23:22:19 1.423
+++ ChangeLog 2001/07/09 23:31:29
@@ -1,3 +1,8 @@
+2001-07-09 David O'Brien <obrien@FreeBSD.org>
+
+ * emultempl/elf32.em: Do not assuming that contents of the buffer returned
+ from basename function will remain unchanged accross other function calls.
+
2001-07-03 H.J. Lu <hjl@gnu.org>
* scripttempl/elf.sc (DYNAMIC_PAD): Revert the change made on
Index: emultempl/elf32.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/elf32.em,v
retrieving revision 1.49
diff -u -r1.49 elf32.em
--- elf32.em 2001/06/18 22:20:57 1.49
+++ elf32.em 2001/07/09 23:31:30
@@ -360,6 +360,9 @@
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. */
More information about the Binutils
mailing list