OSDN Git Service

2001-07-09 David O'Brien <obrien@FreeBSD.org>
authorDavid O'Brien <obrien@FreeBSD.org>
Tue, 10 Jul 2001 00:38:16 +0000 (00:38 +0000)
committerDavid O'Brien <obrien@FreeBSD.org>
Tue, 10 Jul 2001 00:38:16 +0000 (00:38 +0000)
* emultempl/elf32.em: Do not assuming that contents of the buffer
returned from basename function will remain unchanged accross other
function calls.

NOTE: DJ Delorie recomends doing a basename()->lbasename() conversion.

Approved by:  DJ Delorie
              <200107100030.UAA01223@envy.delorie.com>

ld/ChangeLog
ld/emultempl/elf32.em

index 096d1fe..997b6f2 100644 (file)
@@ -1,3 +1,9 @@
+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 4e31b22..a3e08c1 100644 (file)
@@ -360,6 +360,9 @@ cat >>e${EMULATION_NAME}.c <<EOF
      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.  */