This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Stop objcopy trying to convert endianness.
- To: nickc at redhat dot com
- Subject: Re: Stop objcopy trying to convert endianness.
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Date: Thu, 18 Jan 2001 10:05:57 +0100
- CC: binutils at sources dot redhat dot com
> Date: Wed, 17 Jan 2001 16:17:20 -0800
> From: Nick Clifton <nickc@redhat.com>
> After handling another bug report from a customer who complained
> that objcopy could not convert from little-endian to big-endian, I
> have decided to check in this patch. It makes objcopy produce a
> fatal error if such an attempt is made (instead of seg faulting as
> it currently does),
Thanks!
> + if (ibfd->xvec->byteorder != obfd->xvec->byteorder
> + && ibfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN
> + && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
> + {
> + fatal (_("Unable to change endianness of input file(s)"));
> + return;
> + }
You might want to report the name of the ibfd file with the
mismatching endianness. Useful in case it's not that way on
intent.
brgds, H-P