mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 21:41:47 +08:00
* elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
dt_name. (elf_dt_name): Rename from elf_dt_needed_name. * elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not elf_dt_needed_name. (bfd_elf_get_dt_soname): New function. * elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not elf_dt_needed_name. Save the SONAME back in elf_dt_name. * bfd-in.h (bfd_elf_get_dt_soname): Declare. * bfd-in2.h: Rebuild.
This commit is contained in:
@ -1,3 +1,16 @@
|
|||||||
|
Mon Feb 19 12:37:41 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
|
||||||
|
dt_name.
|
||||||
|
(elf_dt_name): Rename from elf_dt_needed_name.
|
||||||
|
* elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not
|
||||||
|
elf_dt_needed_name.
|
||||||
|
(bfd_elf_get_dt_soname): New function.
|
||||||
|
* elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not
|
||||||
|
elf_dt_needed_name. Save the SONAME back in elf_dt_name.
|
||||||
|
* bfd-in.h (bfd_elf_get_dt_soname): Declare.
|
||||||
|
* bfd-in2.h: Rebuild.
|
||||||
|
|
||||||
Mon Feb 19 02:50:23 1996 Doug Evans <dje@charmed.cygnus.com>
|
Mon Feb 19 02:50:23 1996 Doug Evans <dje@charmed.cygnus.com>
|
||||||
|
|
||||||
* elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
|
* elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
|
||||||
|
@ -380,15 +380,15 @@ elf_link_add_object_symbols (abfd, info)
|
|||||||
/* Find the name to use in a DT_NEEDED entry that refers to this
|
/* 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.
|
object. If the object has a DT_SONAME entry, we use it.
|
||||||
Otherwise, if the generic linker stuck something in
|
Otherwise, if the generic linker stuck something in
|
||||||
elf_dt_needed_name, we use that. Otherwise, we just use the
|
elf_dt_name, we use that. Otherwise, we just use the file
|
||||||
file name. If the generic linker put a null string into
|
name. If the generic linker put a null string into
|
||||||
elf_dt_needed_name, we don't make a DT_NEEDED entry at all,
|
elf_dt_name, we don't make a DT_NEEDED entry at all, even if
|
||||||
even if there is a DT_SONAME entry. */
|
there is a DT_SONAME entry. */
|
||||||
add_needed = true;
|
add_needed = true;
|
||||||
name = bfd_get_filename (abfd);
|
name = bfd_get_filename (abfd);
|
||||||
if (elf_dt_needed_name (abfd) != NULL)
|
if (elf_dt_name (abfd) != NULL)
|
||||||
{
|
{
|
||||||
name = elf_dt_needed_name (abfd);
|
name = elf_dt_name (abfd);
|
||||||
if (*name == '\0')
|
if (*name == '\0')
|
||||||
add_needed = false;
|
add_needed = false;
|
||||||
}
|
}
|
||||||
@ -420,7 +420,7 @@ elf_link_add_object_symbols (abfd, info)
|
|||||||
Elf_Internal_Dyn dyn;
|
Elf_Internal_Dyn dyn;
|
||||||
|
|
||||||
elf_swap_dyn_in (abfd, extdyn, &dyn);
|
elf_swap_dyn_in (abfd, extdyn, &dyn);
|
||||||
if (add_needed && dyn.d_tag == DT_SONAME)
|
if (dyn.d_tag == DT_SONAME)
|
||||||
{
|
{
|
||||||
name = bfd_elf_string_from_elf_section (abfd, link,
|
name = bfd_elf_string_from_elf_section (abfd, link,
|
||||||
dyn.d_un.d_val);
|
dyn.d_un.d_val);
|
||||||
@ -520,6 +520,12 @@ elf_link_add_object_symbols (abfd, info)
|
|||||||
if (! elf_add_dynamic_entry (info, DT_NEEDED, strindex))
|
if (! elf_add_dynamic_entry (info, DT_NEEDED, strindex))
|
||||||
goto error_return;
|
goto error_return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 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);
|
||||||
|
elf_dt_name (abfd) = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bfd_seek (abfd,
|
if (bfd_seek (abfd,
|
||||||
|
Reference in New Issue
Block a user