This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] fix ld segv on alpha during gal compilation
- From: Richard Henderson <rth at redhat dot com>
- To: Julien LEMOINE <speedblue at debian dot org>
- Cc: binutils at sources dot redhat dot com
- Date: Mon, 21 Apr 2003 11:25:30 -0700
- Subject: Re: [PATCH] fix ld segv on alpha during gal compilation
- References: <20030418233358.GB4912@trinity.all-3rd.net>
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~