diff options
author | Mike Frysinger <vapier@gentoo.org> | 2013-01-18 17:43:58 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2013-01-18 17:43:58 +0000 |
commit | b1b00fcc619cfa409c4e244f609ab82f3a3c37d2 (patch) | |
tree | 6947756f5289396789c0010bc3b879355709066d /bfd | |
parent | 8ce3d284cb47f1b08c74d8a20b6b0cfd2d225d2c (diff) | |
download | gdb-b1b00fcc619cfa409c4e244f609ab82f3a3c37d2.zip gdb-b1b00fcc619cfa409c4e244f609ab82f3a3c37d2.tar.gz gdb-b1b00fcc619cfa409c4e244f609ab82f3a3c37d2.tar.bz2 |
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')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elflink.c | 13 |
2 files changed, 11 insertions, 8 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 30fead2..85b411a 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2013-01-18 Mike Frysinger <vapier@gentoo.org> + + * elflink.c (bfd_elf_size_dynamic_sections): Only add DT_RPATH + when new_dtags is false. Only add DT_RUNPATH when new_dtags is + true. + 2013-01-17 H.J. Lu <hongjiu.lu@intel.com> * elf32-i386.c (elf_i386_check_relocs): Count size relocation as diff --git a/bfd/elflink.c b/bfd/elflink.c index 6985786..d336730 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) |