* libelf.h (struct elf_obj_tdata): New field dt_needed_name.

(elf_dt_needed_name): New accessor macro.
	* elfcode.h (elf_link_add_object_symbols): If elf_dt_needed_name
	is set, use that instead of the filename for the DT_NEEDED dynamic
	entry.
	* elf.c (bfd_elf_set_dt_needed_name): New function.
	* bfd-in.h (bfd_elf_set_dt_needed_name): Declare.
	* bfd-in2.h: Rebuilt.
This commit is contained in:
Ian Lance Taylor
1994-06-16 00:01:32 +00:00
parent 33b90e5265
commit c1f84521bf
5 changed files with 23 additions and 1 deletions

View File

@@ -4163,8 +4163,12 @@ elf_link_add_object_symbols (abfd, info)
/* Find the name to use in a DT_NEEDED entry that refers to this
object. If the object has a DT_SONAME entry, we use it.
Otherwise, we use the file name. */
Otherwise, if the generic linker stuck something in
elf_dt_needed_name, we use that. Otherwise, we just use the
file name. */
name = bfd_get_filename (abfd);
if (elf_dt_needed_name (abfd) != NULL)
name = elf_dt_needed_name (abfd);
s = bfd_get_section_by_name (abfd, ".dynamic");
if (s != NULL)
{