diff options
author | Jason Thorpe <thorpej@netbsd.org> | 2002-01-27 23:27:23 +0000 |
---|---|---|
committer | Jason Thorpe <thorpej@netbsd.org> | 2002-01-27 23:27:23 +0000 |
commit | a94cef6a79d9f40c91898a3f1c9e83bcb10904fc (patch) | |
tree | 49e2426ab765fa45c09310483ea79e045d4ebc5d /bfd | |
parent | 9d8385df24483bad45028aea9cb172d3a42f37a8 (diff) | |
download | gdb-a94cef6a79d9f40c91898a3f1c9e83bcb10904fc.zip gdb-a94cef6a79d9f40c91898a3f1c9e83bcb10904fc.tar.gz gdb-a94cef6a79d9f40c91898a3f1c9e83bcb10904fc.tar.bz2 |
* elfcore.h (elf_core_file_p): Set the machine architecture
before processing the program headers.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elfcore.h | 14 |
2 files changed, 12 insertions, 7 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index b7a2496..4bcb797 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2002-01-27 Jason Thorpe <thorpej@wasabisystems.com> + + * elfcore.h (elf_core_file_p): Set the machine architecture + before processing the program headers. + 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com> * configure.in <64-bit configuration>: If using gcc, check and diff --git a/bfd/elfcore.h b/bfd/elfcore.h index 2a795a9..5c81812 100644 --- a/bfd/elfcore.h +++ b/bfd/elfcore.h @@ -220,13 +220,6 @@ elf_core_file_p (abfd) 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_section_from_phdr (abfd, i_phdrp + phindex, (int) phindex)) - goto fail; - } - /* Set the machine architecture. */ if (! bfd_default_set_arch_mach (abfd, ebd->arch, 0)) { @@ -235,6 +228,13 @@ elf_core_file_p (abfd) goto fail; } + /* Process each program header. */ + for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex) + { + if (! bfd_section_from_phdr (abfd, i_phdrp + phindex, (int) phindex)) + goto fail; + } + /* Save the entry point from the ELF header. */ bfd_get_start_address (abfd) = i_ehdrp->e_entry; |