summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2015-11-28 11:32:34 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2015-11-28 11:32:34 +0000
commitb42dec342da7462e554abc13b6ed99622028d25c (patch)
treed0fa96a5fc865917f4623a9b26477e999558b311 /gnu
parent52cdc32b959531495a33cc0c68d45cc6616fcc81 (diff)
Back out previous commit. Not emitting DT_RPATH isn't helpful if our ld.so
doesn't grok DT_RUNPATH yet.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/binutils-2.17/bfd/elflink.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gnu/usr.bin/binutils-2.17/bfd/elflink.c b/gnu/usr.bin/binutils-2.17/bfd/elflink.c
index 6f679366b7c..75fff26a14b 100644
--- a/gnu/usr.bin/binutils-2.17/bfd/elflink.c
+++ b/gnu/usr.bin/binutils-2.17/bfd/elflink.c
@@ -5073,9 +5073,15 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, rpath,
TRUE);
if (indx == (bfd_size_type) -1
- || !_bfd_elf_add_dynamic_entry (info, info->new_dtags ?
- DT_RUNPATH : DT_RPATH, indx))
+ || !_bfd_elf_add_dynamic_entry (info, DT_RPATH, indx))
return FALSE;
+
+ if (info->new_dtags)
+ {
+ _bfd_elf_strtab_addref (elf_hash_table (info)->dynstr, indx);
+ if (!_bfd_elf_add_dynamic_entry (info, DT_RUNPATH, indx))
+ return FALSE;
+ }
}
if (filter_shlib != NULL)