diff options
author | Timothy Wall <twall@alum.mit.edu> | 2000-02-09 13:41:44 +0000 |
---|---|---|
committer | Timothy Wall <twall@alum.mit.edu> | 2000-02-09 13:41:44 +0000 |
commit | 363d7b14a5363ce7ea4997ec6ebba4d7a28fe536 (patch) | |
tree | 9b9aca6946f50873250469099195298e22393cc1 | |
parent | 145679a83748fd56b412042267bca5555732d6c5 (diff) | |
download | fsf-binutils-gdb-363d7b14a5363ce7ea4997ec6ebba4d7a28fe536.zip fsf-binutils-gdb-363d7b14a5363ce7ea4997ec6ebba4d7a28fe536.tar.gz fsf-binutils-gdb-363d7b14a5363ce7ea4997ec6ebba4d7a28fe536.tar.bz2 |
Set arch/mach info prior to swapping in sections, so that the swapping
routines have access to the arch/mach info.
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/coffgen.c | 10 |
2 files changed, 12 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d9bd497..0dc5a82 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2000-02-09 Timothy Wall <twall@cygnus.com> + + * coffgen.c (coff_real_object_p): Set arch/mach info prior to + swapping in sections, so that the swapping routines have access to + the arch/mach info. + 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com> * coff-go32.c: Update comment. Update copyright. diff --git a/bfd/coffgen.c b/bfd/coffgen.c index 9884e92..f2410d9 100644 --- a/bfd/coffgen.c +++ b/bfd/coffgen.c @@ -1,5 +1,5 @@ /* Support for the generic parts of COFF, for BFD. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999, 2000 Free Software Foundation, Inc. Written by Cygnus Support. @@ -211,6 +211,11 @@ coff_real_object_p (abfd, nscns, internal_f, internal_a) 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) { @@ -228,9 +233,6 @@ coff_real_object_p (abfd, nscns, internal_f, internal_a) /* make_abs_section (abfd); */ - if (bfd_coff_set_arch_mach_hook (abfd, (PTR) internal_f) == false) - goto fail; - return abfd->xvec; fail: |