This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH for COFF arch/mach info loading


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 ----

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]