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: PR ld/4590: String merging breaks ia64 linker


"H. J. Lu" <hjl@lucon.org> writes:

> @@ -2290,20 +2326,41 @@ sort_dyn_sym_info (struct elfNN_ia64_dyn
>  	  if (len == 1 && dup < count)
>  	    {
>  	      /* If we only move 1 element, we combine it with the next
> -		 one.  Find the next different one.  */
> +		 one.  There must be at least a duplicate.  Find the
> +		 next different one.  */
>  	      for (diff = dup + 1, src++; diff < count; diff++, src++)
> -		if (info [diff].addend != curr)
> -		  break;
> +		{
> +		  if (info [diff].addend != curr)
> +		    break;
> +		  /* Make sure that got_offset is valid.  */
> +		  if (got_offset == (bfd_vma) -1)
> +		    got_offset = info [diff].got_offset;
> +		}
> +
> +	      /* Makre sure that the last duplicated one has an valid
> +		 offset.  */
> +	      BFD_ASSERT (curr == prev);
> +	      if (got_offset == (bfd_vma) -1)
                             !=

With this typo fix it works.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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