This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
A COFF patch
- To: nickc@cygnus.com
- Subject: A COFF patch
- From: hjl@varesearch.com (H.J. Lu)
- Date: Mon, 19 Jul 1999 10:29:37 -0700 (PDT)
- Cc: ian@zembu.com (Ian Lance Taylor), binutils@sourceware.cygnus.com
Hi, Nick,
I don't know what you did to COFF. It seems that your change breaks
"configure --enable-targets=all". This patch seems to fix it. It may
not cover everything nor the best fix. But it is good enough for me
to pass "make check" when I use "configure --enable-targets=all" on
Linux/x86.
Thanks.
--
H.J. Lu (hjl@gnu.org)
---
Mon Jul 19 10:24:55 1998 H.J. Lu (hjl@gnu.org)
* coffgen.c (coff_object_p): Check if we are fed with a COFF
file.
Index: coffgen.c
===================================================================
RCS file: /work/cvs/gnu/binutils/bfd/coffgen.c,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 coffgen.c
--- coffgen.c 1999/07/12 17:13:25 1.1.1.2
+++ coffgen.c 1999/07/19 17:21:51
@@ -254,6 +254,11 @@ coff_object_p (abfd)
struct internal_filehdr internal_f;
struct internal_aouthdr internal_a;
+ /* We may be called as bfd_check_format. We have to be prepared to
+ deal with everything. */
+ if (!coff_backend_info(abfd))
+ return 0;
+
/* figure out how much to read */
filhsz = bfd_coff_filhsz (abfd);
aoutsz = bfd_coff_aoutsz (abfd);