summaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2000-07-20 03:16:18 +0000
committerH.J. Lu <hjl@lucon.org>2000-07-20 03:16:18 +0000
commitedff3544247082b86dde4eb8124399641054089f (patch)
tree01e818ae3aee3f37b3331ead4e85ebae848aa82a /bfd/elf.c
parent01fe344579bf8b38995a016c04036efdd6fbb6b3 (diff)
downloadgdb-edff3544247082b86dde4eb8124399641054089f.tar.gz
2000-07-19 H.J. Lu <hjl@gnu.org>
* bfd-in.h (bfd_elf_set_dt_needed_soname): New. * bfd-in2.h: Rebuild. * elf-bfd.h (elf_obj_tdata): Add dt_soname. (elf_dt_soname): New. * elf.c (bfd_elf_set_dt_needed_soname): New. * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED entry if the shared object loaded by DT_NEEDED is used to resolve the reference in a regular object.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 523dd34b5eb..d394f348cb0 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1050,6 +1050,16 @@ bfd_elf_set_dt_needed_name (abfd, name)
elf_dt_name (abfd) = name;
}
+void
+bfd_elf_set_dt_needed_soname (abfd, name)
+ bfd *abfd;
+ const char *name;
+{
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour
+ && bfd_get_format (abfd) == bfd_object)
+ elf_dt_soname (abfd) = name;
+}
+
/* Get the list of DT_NEEDED entries for a link. This is a hook for
the linker ELF emulation code. */