Lines Matching refs:abfd

38   PARAMS ((bfd *abfd));
42 PARAMS ((bfd *abfd, sec_ptr sect));
63 aout_adobe_swap_exec_header_in (abfd, raw_bytes, execp)
64 bfd *abfd;
71 execp->a_info = H_GET_32 (abfd, bytes->e_info);
72 execp->a_text = GET_WORD (abfd, bytes->e_text);
73 execp->a_data = GET_WORD (abfd, bytes->e_data);
74 execp->a_bss = GET_WORD (abfd, bytes->e_bss);
75 execp->a_syms = GET_WORD (abfd, bytes->e_syms);
76 execp->a_entry = GET_WORD (abfd, bytes->e_entry);
77 execp->a_trsize = GET_WORD (abfd, bytes->e_trsize);
78 execp->a_drsize = GET_WORD (abfd, bytes->e_drsize);
88 aout_adobe_swap_exec_header_out (abfd, execp, raw_bytes)
89 bfd *abfd;
97 H_PUT_32 (abfd, execp->a_info , bytes->e_info);
98 PUT_WORD (abfd, execp->a_text , bytes->e_text);
99 PUT_WORD (abfd, execp->a_data , bytes->e_data);
100 PUT_WORD (abfd, execp->a_bss , bytes->e_bss);
101 PUT_WORD (abfd, execp->a_syms , bytes->e_syms);
102 PUT_WORD (abfd, execp->a_entry , bytes->e_entry);
103 PUT_WORD (abfd, execp->a_trsize, bytes->e_trsize);
104 PUT_WORD (abfd, execp->a_drsize, bytes->e_drsize);
108 aout_adobe_object_p (abfd)
109 bfd *abfd;
116 if (bfd_bread ((PTR) &exec_bytes, amt, abfd) != amt)
123 anexec.a_info = H_GET_32 (abfd, exec_bytes.e_info);
144 aout_adobe_swap_exec_header_in (abfd, &exec_bytes, &anexec);
145 return aout_32_some_aout_object_p (abfd, &anexec, aout_adobe_callback);
152 aout_adobe_callback (abfd)
153 bfd *abfd;
155 struct internal_exec *execp = exec_hdr (abfd);
165 bfd_set_arch_mach (abfd, bfd_arch_unknown, 0L);
168 obj_str_filepos (abfd) = N_STROFF (*execp);
169 obj_sym_filepos (abfd) = N_SYMOFF (*execp);
175 if (bfd_bread ((PTR) ext, amt, abfd) != amt)
205 abfd, ext->e_type[0]);
212 sect = bfd_make_section (abfd, section_name);
221 sect = bfd_make_section (abfd, try_again);
228 newname = (char *) bfd_zalloc (abfd, amt);
236 bfd_set_section_flags (abfd, sect, flags);
241 sect->vma = H_GET_32 (abfd, ext->e_virtbase);
242 sect->filepos = H_GET_32 (abfd, ext->e_filebase);
265 adata (abfd).reloc_entry_size = sizeof (struct reloc_std_external);
266 adata (abfd).symbol_entry_size = sizeof (struct external_nlist);
267 adata (abfd).page_size = 1; /* Not applicable. */
268 adata (abfd).segment_size = 1; /* Not applicable. */
269 adata (abfd).exec_bytes_size = EXEC_BYTES_SIZE;
271 return abfd->xvec;
281 aout_adobe_mkobject (abfd)
282 bfd *abfd;
287 rawptr = (struct bout_data_struct *) bfd_zalloc (abfd, amt);
291 abfd->tdata.bout_data = rawptr;
292 exec_hdr (abfd) = &rawptr->e;
294 adata (abfd).reloc_entry_size = sizeof (struct reloc_std_external);
295 adata (abfd).symbol_entry_size = sizeof (struct external_nlist);
296 adata (abfd).page_size = 1; /* Not applicable. */
297 adata (abfd).segment_size = 1; /* Not applicable. */
298 adata (abfd).exec_bytes_size = EXEC_BYTES_SIZE;
304 aout_adobe_write_object_contents (abfd)
305 bfd *abfd;
312 exec_hdr (abfd)->a_info = ZMAGIC;
316 exec_hdr (abfd)->a_text = 0;
317 exec_hdr (abfd)->a_data = 0;
318 exec_hdr (abfd)->a_bss = 0;
319 exec_hdr (abfd)->a_trsize = 0;
320 exec_hdr (abfd)->a_drsize = 0;
322 for (sect = abfd->sections; sect; sect = sect->next)
326 exec_hdr (abfd)->a_text += sect->size;
327 exec_hdr (abfd)->a_trsize += sect->reloc_count *
332 exec_hdr (abfd)->a_data += sect->size;
333 exec_hdr (abfd)->a_drsize += sect->reloc_count *
338 exec_hdr (abfd)->a_bss += sect->size;
342 exec_hdr (abfd)->a_syms = bfd_get_symcount (abfd)
344 exec_hdr (abfd)->a_entry = bfd_get_start_address (abfd);
346 aout_adobe_swap_exec_header_out (abfd, exec_hdr (abfd), &swapped_hdr);
349 if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
350 || bfd_bwrite ((PTR) &swapped_hdr, amt, abfd) != amt)
356 for (sect = abfd->sections; sect; sect = sect->next)
358 aout_adobe_write_section (abfd, sect);
360 for (sect = abfd->sections; sect; sect = sect->next)
362 aout_adobe_write_section (abfd, sect);
364 for (sect = abfd->sections; sect; sect = sect->next)
366 aout_adobe_write_section (abfd, sect);
370 if (bfd_bwrite ((PTR) sentinel, amt, abfd) != amt)
374 if (bfd_get_symcount (abfd) != 0)
376 if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (*exec_hdr (abfd))), SEEK_SET)
380 if (! aout_32_write_syms (abfd))
383 if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (*exec_hdr (abfd))), SEEK_SET)
387 for (sect = abfd->sections; sect; sect = sect->next)
389 if (!aout_32_squirt_out_relocs (abfd, sect))
392 if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (*exec_hdr (abfd))), SEEK_SET)
396 for (sect = abfd->sections; sect; sect = sect->next)
398 if (!aout_32_squirt_out_relocs (abfd, sect))
406 aout_adobe_write_section (abfd, sect)
407 bfd *abfd ATTRIBUTE_UNUSED;
415 aout_adobe_set_section_contents (abfd, section, location, offset, count)
416 bfd *abfd;
426 if (! abfd->output_has_begun)
432 for (sect = abfd->sections; sect; sect = sect->next)
442 for (sect = abfd->sections; sect; sect = sect->next)
452 for (sect = abfd->sections; sect; sect = sect->next)
466 if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0)
472 return bfd_bwrite ((PTR) location, count, abfd) == count;
476 aout_adobe_set_arch_mach (abfd, arch, machine)
477 bfd *abfd;
481 if (! bfd_default_set_arch_mach (abfd, arch, machine))