[PATCH 1/2 v4] ld: change --enable-new-dtags to only generate new dtags
Alan Modra
amodra@gmail.com
Thu Jan 17 21:33:00 GMT 2013
On Thu, Jan 17, 2013 at 02:22:20PM -0500, Mike Frysinger wrote:
> --- a/bfd/elflink.c
> +++ b/bfd/elflink.c
> @@ -5733,11 +5733,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, DT_RPATH, indx))
> + if (indx == (bfd_size_type) -1)
> return FALSE;
>
> - if (info->new_dtags)
> + if (!info->new_dtags)
> + {
> + if (!_bfd_elf_add_dynamic_entry (info, DT_RPATH, indx))
> + return FALSE;
> + }
> + else
> {
> _bfd_elf_strtab_addref (elf_hash_table (info)->dynstr, indx);
> if (!_bfd_elf_add_dynamic_entry (info, DT_RUNPATH, indx))
That _bfd_elf_strtab_addref will cause assertion failures when you get
around to testing this patch, I think.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list