Deleted Added
full compact
elfcore.h (89857) elfcore.h (91041)
1/* ELF core file support for BFD.
2 Copyright 1995, 1996, 1997, 1998, 2000, 2001
3 Free Software Foundation, Inc.
4
5This file is part of BFD, the Binary File Descriptor library.
6
7This program is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by

--- 206 unchanged lines hidden (view full) ---

215 Elf_External_Phdr x_phdr;
216 if (bfd_bread ((PTR) &x_phdr, (bfd_size_type) sizeof (x_phdr), abfd)
217 != sizeof (x_phdr))
218 goto fail;
219
220 elf_swap_phdr_in (abfd, &x_phdr, i_phdrp + phindex);
221 }
222
1/* ELF core file support for BFD.
2 Copyright 1995, 1996, 1997, 1998, 2000, 2001
3 Free Software Foundation, Inc.
4
5This file is part of BFD, the Binary File Descriptor library.
6
7This program is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by

--- 206 unchanged lines hidden (view full) ---

215 Elf_External_Phdr x_phdr;
216 if (bfd_bread ((PTR) &x_phdr, (bfd_size_type) sizeof (x_phdr), abfd)
217 != sizeof (x_phdr))
218 goto fail;
219
220 elf_swap_phdr_in (abfd, &x_phdr, i_phdrp + phindex);
221 }
222
223 /* Process each program header. */
224 for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex)
223 /* Set the machine architecture. Do this before processing the
224 program headers since we need to know the architecture type
225 when processing the notes of some systems' core files. */
226 if (! bfd_default_set_arch_mach (abfd, ebd->arch, 0))
225 {
227 {
226 if (! bfd_section_from_phdr (abfd, i_phdrp + phindex, (int) phindex))
228 /* It's OK if this fails for the generic target. */
229 if (ebd->elf_machine_code != EM_NONE)
227 goto fail;
228 }
229
230 goto fail;
231 }
232
230 /* Set the machine architecture. */
231 if (! bfd_default_set_arch_mach (abfd, ebd->arch, 0))
233 /* Process each program header. */
234 for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex)
232 {
235 {
233 /* It's OK if this fails for the generic target. */
234 if (ebd->elf_machine_code != EM_NONE)
236 if (! bfd_section_from_phdr (abfd, i_phdrp + phindex, (int) phindex))
235 goto fail;
236 }
237
238 /* Save the entry point from the ELF header. */
239 bfd_get_start_address (abfd) = i_ehdrp->e_entry;
240
241 /* Let the backend double check the format and override global
242 information. */

--- 36 unchanged lines hidden ---
237 goto fail;
238 }
239
240 /* Save the entry point from the ELF header. */
241 bfd_get_start_address (abfd) = i_ehdrp->e_entry;
242
243 /* Let the backend double check the format and override global
244 information. */

--- 36 unchanged lines hidden ---