This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/2 v4] ld: change --enable-new-dtags to only generate new dtags


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]