From: jtc@redback.com (J.T. Conklin)
To: binutils@sourceware.cygnus.com
Subject: Re: linking binary 'hunks' into images
Date: Fri, 01 Oct 1999 15:09:00 -0000 [thread overview]
Message-ID: <5m3dvuybsc.fsf@jtc.redbacknetworks.com> (raw)
In-Reply-To: <19991001205714.9178.qmail@daffy.airs.com>
>>>>> "Ian" == Ian Lance Taylor <ian@zembu.com> writes:
Ian> - Is this the correct fix for the problem?
Ian>
Ian> Yes.
Ian>
Ian> - If so, should this also be applied to elf32-mips.c and
Ian> elf32-mcore.c?
Ian>
Ian> Yes.
I've enclosed a patch relative to the current binutils repository on
sourceware.
However, while I was constructing the patch, I started thinking that a
better fix might be changing the *_merge_private_bfd_data() functions
to call common code in _bfd_generic_verify_endian_match(). In addition
to the differences in the conditional, I noticed that not all of the
versions of this code were changed for message catalogs.
If that is a better fix, I'd be happy to revise my patch accordingly.
--jtc
1999-10-01 J.T. Conklin <jtc@redback.com>
* elf32-mcore.c (mcore_elf_merge_private_bfd_data): Allow linking
in objects with unknown (BFD_ENDIAN_UNKNOWN) byte order.
* elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
* elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
* libbfd.c (_bfd_generic_verify_endian_match): Likewise.
Index: elf32-mcore.c
===================================================================
RCS file: /cvs/binutils/binutils/bfd/elf32-mcore.c,v
retrieving revision 1.5
diff -c -r1.5 elf32-mcore.c
*** elf32-mcore.c 1999/07/12 10:29:24 1.5
--- elf32-mcore.c 1999/10/01 21:45:54
***************
*** 323,329 ****
/* Check if we have the same endianess */
if ( ibfd->xvec->byteorder != obfd->xvec->byteorder
! && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
{
(*_bfd_error_handler)
(_("%s: compiled for a %s endian system and target is %s endian.\n"),
--- 323,330 ----
/* Check if we have the same endianess */
if ( ibfd->xvec->byteorder != obfd->xvec->byteorder
! && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN
! && ibfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
{
(*_bfd_error_handler)
(_("%s: compiled for a %s endian system and target is %s endian.\n"),
Index: elf32-mips.c
===================================================================
RCS file: /cvs/binutils/binutils/bfd/elf32-mips.c,v
retrieving revision 1.52
diff -c -r1.52 elf32-mips.c
*** elf32-mips.c 1999/09/28 04:11:05 1.52
--- elf32-mips.c 1999/10/01 21:45:58
***************
*** 2351,2358 ****
boolean ok;
/* Check if we have the same endianess */
! if (ibfd->xvec->byteorder != obfd->xvec->byteorder
! && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
{
const char *msg;
--- 2351,2359 ----
boolean ok;
/* Check if we have the same endianess */
! if ( ibfd->xvec->byteorder != obfd->xvec->byteorder
! && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN
! && ibfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
{
const char *msg;
Index: elf32-ppc.c
===================================================================
RCS file: /cvs/binutils/binutils/bfd/elf32-ppc.c,v
retrieving revision 1.7
diff -c -r1.7 elf32-ppc.c
*** elf32-ppc.c 1999/08/03 16:40:25 1.7
--- elf32-ppc.c 1999/10/01 21:46:01
***************
*** 1399,1406 ****
boolean error;
/* Check if we have the same endianess */
! if (ibfd->xvec->byteorder != obfd->xvec->byteorder
! && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
{
const char *msg;
--- 1399,1407 ----
boolean error;
/* Check if we have the same endianess */
! if ( ibfd->xvec->byteorder != obfd->xvec->byteorder
! && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN
! && ibfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
{
const char *msg;
Index: libbfd.c
===================================================================
RCS file: /cvs/binutils/binutils/bfd/libbfd.c,v
retrieving revision 1.6
diff -c -r1.6 libbfd.c
*** libbfd.c 1999/09/12 14:27:21 1.6
--- libbfd.c 1999/10/01 21:46:01
***************
*** 1283,1290 ****
bfd *ibfd;
bfd *obfd;
{
! if (ibfd->xvec->byteorder != obfd->xvec->byteorder
! && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
{
(*_bfd_error_handler)
("%s: compiled for a %s endian system and target is %s endian",
--- 1283,1291 ----
bfd *ibfd;
bfd *obfd;
{
! if ( ibfd->xvec->byteorder != obfd->xvec->byteorder
! && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN
! && ibfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
{
(*_bfd_error_handler)
("%s: compiled for a %s endian system and target is %s endian",
--
J.T. Conklin
RedBack Networks
prev parent reply other threads:[~1999-10-01 15:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-10-01 12:41 J.T. Conklin
1999-10-01 13:57 ` Ian Lance Taylor
1999-10-01 15:09 ` J.T. Conklin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5m3dvuybsc.fsf@jtc.redbacknetworks.com \
--to=jtc@redback.com \
--cc=binutils@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).