This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 1/2 v4] ld: change --enable-new-dtags to only generate new dtags
- From: Alan Modra <amodra at gmail dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: binutils at sourceware dot org
- Date: Fri, 18 Jan 2013 08:03:05 +1030
- Subject: Re: [PATCH 1/2 v4] ld: change --enable-new-dtags to only generate new dtags
- References: <1356420600-11507-1-git-send-email-vapier@gentoo.org> <1358450541-17875-1-git-send-email-vapier@gentoo.org>
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