bug in elf32-tic6x.c binutils
Joseph S. Myers
joseph@codesourcery.com
Wed Mar 21 14:57:00 GMT 2012
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
More information about the Binutils
mailing list