diff options
author | Nick Clifton <nickc@redhat.com> | 2001-01-18 00:17:43 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2001-01-18 00:17:43 +0000 |
commit | 23719f397d0b91d40410206aee6ef8c716a48397 (patch) | |
tree | ff236a143ccf554a705bd1fcc23a47bdbd3a902e /binutils/objcopy.c | |
parent | e5cb08ac57c00200554cf8853dfd9a928ec6028d (diff) | |
download | gdb-23719f397d0b91d40410206aee6ef8c716a48397.zip gdb-23719f397d0b91d40410206aee6ef8c716a48397.tar.gz gdb-23719f397d0b91d40410206aee6ef8c716a48397.tar.bz2 |
Stop objcopy trying to convert endianness.
Diffstat (limited to 'binutils/objcopy.c')
-rw-r--r-- | binutils/objcopy.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 21f5793..cae66fc 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -1,5 +1,5 @@ /* objcopy.c -- copy object file from input to output, optionally massaging it. - Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -765,6 +765,13 @@ copy_object (ibfd, obfd) long symsize; PTR dhandle; + 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; + } if (!bfd_set_format (obfd, bfd_get_format (ibfd))) RETURN_NONFATAL (bfd_get_filename (obfd)); |