aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.h
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2001-05-03 06:18:09 +0000
committerH.J. Lu <hjl.tools@gmail.com>2001-05-03 06:18:09 +0000
commit210ba1e83d46204c1c1afaa6bb91b83c8186608d (patch)
tree32fa7e8ca72f64b47ebba21216f90a77668dde7b /bfd/elflink.h
parentb274749094a9c6308250a5e2f31a7fe92b122a47 (diff)
downloadgdb-210ba1e83d46204c1c1afaa6bb91b83c8186608d.zip
gdb-210ba1e83d46204c1c1afaa6bb91b83c8186608d.tar.gz
gdb-210ba1e83d46204c1c1afaa6bb91b83c8186608d.tar.bz2
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.
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r--bfd/elflink.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h
index 4973ae3..6c442dd 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;