summaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2013-01-18 17:43:55 +0000
committerMike Frysinger <vapier@gentoo.org>2013-01-18 17:43:55 +0000
commit233fe79d27df8ea20b728dddf29709eaf5870d67 (patch)
tree96520cba253ba62b6d5023fc1563d150e1b3f84d /bfd/elflink.c
parent732ab981c5d4d05204dfa2c4530cd868854c64f9 (diff)
downloadbinutils-redhat-233fe79d27df8ea20b728dddf29709eaf5870d67.tar.gz
ld: change --enable-new-dtags to only generate new dtags
The "new" dtags options have been around for 14+ years, so there shouldn't be a need to generate both new & old tags anymore. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 6985786e21..d336730e07 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -5730,19 +5730,16 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
if (rpath != NULL)
{
bfd_size_type indx;
+ bfd_vma tag;
indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, rpath,
TRUE);
- if (indx == (bfd_size_type) -1
- || !_bfd_elf_add_dynamic_entry (info, DT_RPATH, indx))
+ if (indx == (bfd_size_type) -1)
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;
- }
+ tag = info->new_dtags ? DT_RUNPATH : DT_RPATH;
+ if (!_bfd_elf_add_dynamic_entry (info, tag, indx))
+ return FALSE;
}
if (filter_shlib != NULL)