[PATCH] fix ld segv on alpha during gal compilation

Richard Henderson rth@redhat.com
Mon Apr 21 18:27:00 GMT 2003


On Sat, Apr 19, 2003 at 01:33:58AM +0200, Julien LEMOINE wrote:
>    loc = srel->contents;
>    loc += srel->reloc_count++ * sizeof (Elf64_External_Rela);
> -  bfd_elf64_swap_reloca_out (abfd, &outrel, loc);
> -  BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
> -	      <= srel->_cooked_size);
> +  if (loc)
> +    {
> +      bfd_elf64_swap_reloca_out (abfd, &outrel, loc);
> +      BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
> +		  <= srel->_cooked_size);
> +    }

This is incorrect.  srel->contents should not have been null.
The fix needs to happen somewhere else.


r~



More information about the Binutils mailing list