Lines Matching defs:obfd

47   bfd *obfd;
69 obfd = bfd_openw (corefilename, default_gcore_target ());
70 if (!obfd)
74 old_chain = make_cleanup_bfd_close (obfd);
76 bfd_set_format (obfd, bfd_core);
77 bfd_set_arch_mach (obfd, default_gcore_arch (), default_gcore_mach ());
80 note_data = target_make_corefile_notes (obfd, &note_size);
85 note_sec = bfd_make_section_anyway (obfd, "note0");
90 bfd_set_section_vma (obfd, note_sec, 0);
91 bfd_set_section_flags (obfd, note_sec,
93 bfd_set_section_alignment (obfd, note_sec, 0);
94 bfd_set_section_size (obfd, note_sec, note_size);
98 if (gcore_memory_sections (obfd) == 0)
104 if (!bfd_set_section_contents (obfd, note_sec, note_data, 0, note_size))
289 make_output_phdrs (bfd *obfd, asection *osec, void *ignored)
295 if (strncmp (bfd_section_name (obfd, osec), "load", 4) == 0)
301 if (!(bfd_get_section_flags (obfd, osec) & SEC_READONLY))
303 if (bfd_get_section_flags (obfd, osec) & SEC_CODE)
306 bfd_record_phdr (obfd, p_type, 1, p_flags, 0, 0, 0, 0, 1, &osec);
313 bfd *obfd = data;
340 bfd *abfd = objfile->obfd;
371 osec = bfd_make_section_anyway (obfd, "load");
385 bfd_set_section_size (obfd, osec, size);
386 bfd_set_section_vma (obfd, osec, vaddr);
387 bfd_section_lma (obfd, osec) = 0; /* ??? bfd_set_section_lma? */
388 bfd_set_section_flags (obfd, osec, flags);
395 void *obfd)
405 bfd *ibfd = objfile->obfd;
419 obfd);
431 obfd);
439 obfd);
445 gcore_copy_callback (bfd *obfd, asection *osec, void *ignored)
447 bfd_size_type size = bfd_section_size (obfd, osec);
452 if ((bfd_get_section_flags (obfd, osec) & SEC_LOAD) == 0)
456 if (strncmp ("load", bfd_section_name (obfd, osec), 4) != 0)
465 if (target_read_memory (bfd_section_vma (obfd, osec),
468 paddr_d (size), paddr (bfd_section_vma (obfd, osec)));
469 if (!bfd_set_section_contents (obfd, osec, memhunk, 0, size))
477 gcore_memory_sections (bfd *obfd)
479 if (target_find_memory_regions (gcore_create_callback, obfd) != 0)
483 bfd_map_over_sections (obfd, make_output_phdrs, NULL);
486 bfd_map_over_sections (obfd, gcore_copy_callback, NULL);