This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: bug in elf32-tic6x.c binutils
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Eliot Dresselhaus <eliot at sonic dot net>
- Cc: bernds at codesourcery dot com, binutils at sourceware dot org
- Date: Wed, 21 Mar 2012 14:56:55 +0000 (UTC)
- Subject: Re: bug in elf32-tic6x.c binutils
- References: <4F4FB537.2040105@sonic.net> <Pine.LNX.4.64.1203011747110.2578@digraph.polyomino.org.uk> <4F4FB760.7060505@sonic.net>
On Thu, 1 Mar 2012, Eliot Dresselhaus wrote:
> Without the patch "ld --warn-once -o /dev/null -b binary /dev/null" segfaults
> on binutils-2.22
>
> diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
> index 19287fe..44042eb 100644
> --- a/bfd/elf32-tic6x.c
> +++ b/bfd/elf32-tic6x.c
> @@ -4018,6 +4018,9 @@ elf32_tic6x_merge_private_bfd_data (bfd *ibfd, bfd
> *obfd)
> if (!_bfd_generic_verify_endian_match (ibfd, obfd))
> return FALSE;
>
> + if (! is_tic6x_elf (ibfd) || ! is_tic6x_elf (obfd))
> + return TRUE;
> +
Thanks, I've committed this patch.
We really ought to have an architecture-independent test for this in the
ld testsuite, I'm pretty sure I've seen such issues for other
architectures before....
--
Joseph S. Myers
joseph@codesourcery.com