2000-07-19 H.J. Lu <hjl@gnu.org>
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 20 Jul 2000 03:17:32 +0000 (03:17 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 20 Jul 2000 03:17:32 +0000 (03:17 +0000)
* emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Call
bfd_elf_set_dt_needed_soname ().

ld/ChangeLog
ld/emultempl/elf32.em

index 0b661b562fff00f6c6811426e09eafe95ead0830..db296639128f654109dd4a1469f602aebe26aed3 100644 (file)
@@ -1,3 +1,8 @@
+2000-07-19  H.J. Lu  <hjl@gnu.org>
+
+       * emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Call
+       bfd_elf_set_dt_needed_soname ().
+
 2000-07-18  DJ Delorie  <dj@cygnus.com>
 
        * pe-dll.c (pe_dll_id_target): check object target name also
index 7a9c8822fda91b7cb3092bf98fed3de5ef729bf4..3cdb856861ed0a32223a25e24e2ceb8dd6d6bfad 100644 (file)
@@ -532,6 +532,18 @@ cat >>e${EMULATION_NAME}.c <<EOF
      DT_NEEDED entry for this file.  */
   bfd_elf_set_dt_needed_name (abfd, "");
 
+  /* First strip off everything before the last '/'.  */
+  name = strrchr (abfd->filename, '/');
+  if (name)
+    name++;
+  else
+    name = 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.  */
+  bfd_elf_set_dt_needed_soname (abfd, name);
+
   /* Add this file into the symbol table.  */
   if (! bfd_link_add_symbols (abfd, &link_info))
     einfo ("%F%B: could not read symbols: %E\n", abfd);
This page took 0.029579 seconds and 4 git commands to generate.