Deleted Added
sdiff udiff text old ( 89857 ) new ( 91041 )
full compact
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 /* 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))
227 {
228 /* It's OK if this fails for the generic target. */
229 if (ebd->elf_machine_code != EM_NONE)
230 goto fail;
231 }
232
233 /* Process each program header. */
234 for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex)
235 {
236 if (! bfd_section_from_phdr (abfd, i_phdrp + phindex, (int) phindex))
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 ---