This is the mail archive of the binutils@sources.redhat.com 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] fix ld segv on alpha during gal compilation


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~


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