summaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2000-08-22 19:33:16 +0000
committerH.J. Lu <hjl@lucon.org>2000-08-22 19:33:16 +0000
commitb1919d85dd86b84507c16d6d7329870915a8f6da (patch)
tree8c84c60d979bc30eff61d59861944ce6f79e33c0 /bfd/elf.c
parent9b6670213674be4e8c042032605408809041bef0 (diff)
downloadgdb-b1919d85dd86b84507c16d6d7329870915a8f6da.tar.gz
2000-08-22 H.J. Lu <hjl@gnu.org>
* elf-bfd.h (elf_link_hash_table): Add runpath. * bfd-in.h (bfd_elf_get_runpath_list): New prototype. * bfd-in2.h: Rebuilt. * elf.c (_bfd_elf_link_hash_table_init): Initialize the "runpath" field to NULL. (bfd_elf_get_runpath_list): New function. * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and DT_RUNPATH entries.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 7e30580d3a0..4377797d4aa 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1007,6 +1007,7 @@ _bfd_elf_link_hash_table_init (table, abfd, newfunc)
table->dynstr = NULL;
table->bucketcount = 0;
table->needed = NULL;
+ table->runpath = NULL;
table->hgot = NULL;
table->stab_info = NULL;
table->dynlocal = NULL;
@@ -1073,6 +1074,19 @@ bfd_elf_get_needed_list (abfd, info)
return elf_hash_table (info)->needed;
}
+/* Get the list of DT_RPATH/DT_RUNPATH entries for a link. This is a
+ hook for the linker ELF emulation code. */
+
+struct bfd_link_needed_list *
+bfd_elf_get_runpath_list (abfd, info)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info;
+{
+ if (info->hash->creator->flavour != bfd_target_elf_flavour)
+ return NULL;
+ return elf_hash_table (info)->runpath;
+}
+
/* Get the name actually used for a dynamic object for a link. This
is the SONAME entry if there is one. Otherwise, it is the string
passed to bfd_elf_set_dt_needed_name, or it is the filename. */