This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
PATCH for COFF arch/mach info loading
- To: binutils at sourceware dot cygnus dot com
- Subject: PATCH for COFF arch/mach info loading
- From: Timothy Wall <twall at domesolutions dot com>
- Date: Tue, 08 Feb 2000 17:22:45 -0500
- CC: nickc at cygnus dot com
- Organization: Dome Solutions
This patch sets the BFD arch/mach info prior to swapping in sections, in
case the section swapping depends on the arch/mach info (true for some
TI COFF targets).
* bfd/coffgen.c (coff_real_object_p): Set BFD arch/mach info *before*
swapping in sections instead of after.
Index: coffgen.c
===================================================================
RCS file: /cvs/src/src/bfd/coffgen.c,v
retrieving revision 1.10
diff -d -c -p -r1.10 coffgen.c
*** coffgen.c 2000/01/13 22:10:36 1.10
--- coffgen.c 2000/02/08 22:15:24
*************** coff_real_object_p (abfd, nscns, interna
*** 211,216 ****
--- 211,221 ----
if (bfd_read ((PTR) external_sections, 1, readsize, abfd) != readsize)
goto fail;
+ /* Set the arch/mach *before* swapping in sections; section header swapping
+ may depend on arch/mach info. */
+ if (bfd_coff_set_arch_mach_hook (abfd, (PTR) internal_f) == false)
+ goto fail;
+
/* Now copy data as required; construct all asections etc */
if (nscns != 0)
{
*************** coff_real_object_p (abfd, nscns, interna
*** 227,235 ****
}
/* make_abs_section (abfd); */
-
- if (bfd_coff_set_arch_mach_hook (abfd, (PTR) internal_f) == false)
- goto fail;
return abfd->xvec;
--- 232,237 ----