diff options
author | obrien <obrien@FreeBSD.org> | 2002-03-20 22:04:42 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2002-03-20 22:04:42 +0000 |
commit | cceb3da6eae1fec01944d6984f08a8543a0e5443 (patch) | |
tree | f4c0f11d066e5ce845192c0cac00ce000b7c1114 /contrib/binutils/ld | |
parent | 4d3d352980dce67c06c1c3f46fcc810013ac0084 (diff) | |
download | FreeBSD-src-cceb3da6eae1fec01944d6984f08a8543a0e5443.zip FreeBSD-src-cceb3da6eae1fec01944d6984f08a8543a0e5443.tar.gz |
Merge rev 1.2 (teach `ld' how to access FreeBSD's ld ELF hints)
into Binutils 2.12.0.
Diffstat (limited to 'contrib/binutils/ld')
-rw-r--r-- | contrib/binutils/ld/emultempl/elf32.em | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/contrib/binutils/ld/emultempl/elf32.em b/contrib/binutils/ld/emultempl/elf32.em index 387f55a..f09d1a8 100644 --- a/contrib/binutils/ld/emultempl/elf32.em +++ b/contrib/binutils/ld/emultempl/elf32.em @@ -168,7 +168,7 @@ gld${EMULATION_NAME}_vercheck (s) soname = bfd_elf_get_dt_soname (s->the_bfd); if (soname == NULL) - soname = basename (bfd_get_filename (s->the_bfd)); + soname = lbasename (bfd_get_filename (s->the_bfd)); for (l = global_vercheck_needed; l != NULL; l = l->next) { @@ -250,7 +250,7 @@ gld${EMULATION_NAME}_stat_needed (s) soname = bfd_elf_get_dt_soname (s->the_bfd); if (soname == NULL) - soname = basename (s->filename); + soname = lbasename (s->filename); if (strncmp (soname, global_needed->name, suffix - global_needed->name) == 0) einfo ("%P: warning: %s, needed by %B, may conflict with %s\n", @@ -354,7 +354,7 @@ cat >>e${EMULATION_NAME}.c <<EOF einfo ("%F%P:%B: bfd_stat failed: %E\n", abfd); /* First strip off everything before the last '/'. */ - soname = basename (abfd->filename); + soname = lbasename (abfd->filename); if (trace_file_tries) info_msg (_("found %s at %s\n"), soname, name); @@ -372,9 +372,6 @@ 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. */ @@ -1047,7 +1044,7 @@ gld${EMULATION_NAME}_open_dynamic_archive (arch, search, entry) /* Rather than duplicating the logic above. Just use the filename we recorded earlier. */ - filename = xstrdup (basename (entry->filename)); + filename = lbasename (entry->filename); bfd_elf_set_dt_needed_name (entry->the_bfd, filename); } |