2001-05-03 H.J. Lu <hjl@gnu.org>
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 3 May 2001 06:18:09 +0000 (06:18 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 3 May 2001 06:18:09 +0000 (06:18 +0000)
* elfcode.h: Include "libiberty.h".

* elflink.h (elf_link_add_object_symbols): Set
elf_dt_name (abfd) to basename of the bfd filename.
(NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
of the bfd filename.

bfd/ChangeLog
bfd/elfcode.h
bfd/elflink.h

index 209d7da13a238af7d5b106a3d8449b6abb4f6dda..85055bf39ff0fc67f22798f7c64ee1f0f58b601a 100644 (file)
@@ -1,3 +1,12 @@
+2001-05-03  H.J. Lu  <hjl@gnu.org>
+
+       * elfcode.h: Include "libiberty.h".
+
+       * elflink.h (elf_link_add_object_symbols): Set
+       elf_dt_name (abfd) to basename of the bfd filename.
+       (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
+       of the bfd filename.
+
 2001-05-03  Andreas Jaeger  <aj@suse.de>
 
        * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
index 4984896d65db2694808dfef17bbe44300edb15aa..c5e9821b8998e62a8760cd8de30e912dc2b737c1 100644 (file)
@@ -66,6 +66,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "bfd.h"
 #include "sysdep.h"
+#include "libiberty.h"
 #include "bfdlink.h"
 #include "libbfd.h"
 #include "elf-bfd.h"
index 4973ae36f21100718c11d293cdf2fb202db61ca5..6c442dda22b94f5a4913c7953b71cc98914e1190 100644 (file)
@@ -1322,7 +1322,7 @@ elf_link_add_object_symbols (abfd, info)
       /* Save the SONAME, if there is one, because sometimes the
          linker emulation code will need to know it.  */
       if (*name == '\0')
-       name = bfd_get_filename (abfd);
+       name = basename (bfd_get_filename (abfd));
       elf_dt_name (abfd) = name;
     }
 
@@ -3317,7 +3317,8 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
                                             true, false);
                else
                  indx = _bfd_stringtab_add (elf_hash_table (info)->dynstr,
-                                            t->vn_bfd->filename, true, false);
+                                            basename (t->vn_bfd->filename),
+                                            true, false);
                if (indx == (bfd_size_type) -1)
                  return false;
                t->vn_file = indx;