From 210ba1e83d46204c1c1afaa6bb91b83c8186608d Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 3 May 2001 06:18:09 +0000 Subject: [PATCH] 2001-05-03 H.J. Lu * 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 | 9 +++++++++ bfd/elfcode.h | 1 + bfd/elflink.h | 5 +++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 209d7da13a2..85055bf39ff 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,12 @@ +2001-05-03 H.J. Lu + + * 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 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute. diff --git a/bfd/elfcode.h b/bfd/elfcode.h index 4984896d65d..c5e9821b899 100644 --- a/bfd/elfcode.h +++ b/bfd/elfcode.h @@ -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" diff --git a/bfd/elflink.h b/bfd/elflink.h index 4973ae36f21..6c442dda22b 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -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; -- 2.30.2