Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/dist/toolchain/bfd Set the machine architecture in the b...



details:   https://anonhg.NetBSD.org/src/rev/e99d4f523fac
branches:  trunk
changeset: 521293:e99d4f523fac
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Jan 27 20:12:09 2002 +0000

description:
Set the machine architecture in the bfd structure before
parsing the program headers.

diffstat:

 gnu/dist/toolchain/bfd/elfcore.h |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (31 lines):

diff -r da3daa574ae3 -r e99d4f523fac gnu/dist/toolchain/bfd/elfcore.h
--- a/gnu/dist/toolchain/bfd/elfcore.h  Sun Jan 27 19:50:10 2002 +0000
+++ b/gnu/dist/toolchain/bfd/elfcore.h  Sun Jan 27 20:12:09 2002 +0000
@@ -203,13 +203,6 @@
       elf_swap_phdr_in (abfd, &x_phdr, i_phdrp + phindex);
     }
 
-  /* Process each program header.  */
-  for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex)
-    {
-      if (!_bfd_elfcore_section_from_phdr (abfd, i_phdrp + phindex, phindex))
-       goto fail;
-    }
-
   /* Set the machine architecture.  */
   if (! bfd_default_set_arch_mach (abfd, ebd->arch, 0))
     {
@@ -218,6 +211,13 @@
        goto fail;
     }
 
+  /* Process each program header.  */
+  for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex)
+    {
+      if (!_bfd_elfcore_section_from_phdr (abfd, i_phdrp + phindex, phindex))
+       goto fail;
+    }
+
   /* Save the entry point from the ELF header.  */
   bfd_get_start_address (abfd) = i_ehdrp->e_entry;
 



Home | Main Index | Thread Index | Old Index