2000-07-19 H.J. Lu <hjl@gnu.org>

* emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Call
	bfd_elf_set_dt_needed_soname ().
This commit is contained in:
H.J. Lu 2000-07-20 03:17:32 +00:00
parent 7481689898
commit 49e56c493d
2 changed files with 17 additions and 0 deletions

View 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

View 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);