aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/elf32.em
diff options
context:
space:
mode:
authorDavid O'Brien <obrien@FreeBSD.org>2001-07-10 00:38:16 +0000
committerDavid O'Brien <obrien@FreeBSD.org>2001-07-10 00:38:16 +0000
commitc2a1a436ff678160c25ed50f07f3a5f122e044d2 (patch)
tree39871e87fc247ac5f3d5b06316b29fff3e7820ec /ld/emultempl/elf32.em
parent2309f640710e4e3efde8f9b89e8d6140a13cd97e (diff)
downloadfsf-binutils-gdb-c2a1a436ff678160c25ed50f07f3a5f122e044d2.zip
fsf-binutils-gdb-c2a1a436ff678160c25ed50f07f3a5f122e044d2.tar.gz
fsf-binutils-gdb-c2a1a436ff678160c25ed50f07f3a5f122e044d2.tar.bz2
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. NOTE: DJ Delorie recomends doing a basename()->lbasename() conversion. Approved by: DJ Delorie <200107100030.UAA01223@envy.delorie.com>
Diffstat (limited to 'ld/emultempl/elf32.em')
-rw-r--r--ld/emultempl/elf32.em3
1 files changed, 3 insertions, 0 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 4e31b22..a3e08c1 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -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. */