Home | History | Annotate | Download | only in bfd

Lines Matching full:execp

120 #define WRITE_HEADERS(abfd, execp) pdp11_aout_write_headers (abfd, execp)
292 pdp11_aout_write_headers (bfd *abfd, struct internal_exec *execp)
301 execp->a_syms = bfd_get_symcount (abfd) * EXTERNAL_NLIST_SIZE;
302 execp->a_entry = bfd_get_start_address (abfd);
307 execp->a_trsize = execp->a_text;
308 execp->a_drsize = execp->a_data;
312 execp->a_trsize = 0;
313 execp->a_drsize = 0;
316 NAME (aout, swap_exec_header_out) (abfd, execp, & exec_bytes);
329 if (bfd_seek (abfd, (file_ptr) (N_SYMOFF(*execp)), SEEK_SET) != 0)
339 if (bfd_seek (abfd, (file_ptr) (N_TRELOFF(*execp)), SEEK_SET) != 0
341 || bfd_seek (abfd, (file_ptr) (N_DRELOFF(*execp)), SEEK_SET) != 0
356 struct internal_exec *execp = exec_hdr (abfd);
371 return WRITE_HEADERS (abfd, execp);
376 structure "execp". */
382 struct internal_exec *execp)
388 memset ((void *) execp, 0, sizeof (struct internal_exec));
389 /* Now fill in fields in the execp, from the bytes in the raw data. */
390 execp->a_info = GET_MAGIC (abfd, bytes->e_info);
391 execp->a_text = GET_WORD (abfd, bytes->e_text);
392 execp->a_data = GET_WORD (abfd, bytes->e_data);
393 execp->a_bss = GET_WORD (abfd, bytes->e_bss);
394 execp->a_syms = GET_WORD (abfd, bytes->e_syms);
395 execp->a_entry = GET_WORD (abfd, bytes->e_entry);
399 execp->a_trsize = 0;
400 execp->a_drsize = 0;
404 execp->a_trsize = execp->a_text;
405 execp->a_drsize = execp->a_data;
412 "execp" into the buffer "bytes" ready for writing to disk. */
415 struct internal_exec *execp,
419 PUT_MAGIC (abfd, execp->a_info, bytes->e_info);
420 PUT_WORD (abfd, execp->a_text, bytes->e_text);
421 PUT_WORD (abfd, execp->a_data, bytes->e_data);
422 PUT_WORD (abfd, execp->a_bss, bytes->e_bss);
423 PUT_WORD (abfd, execp->a_syms, bytes->e_syms);
424 PUT_WORD (abfd, execp->a_entry, bytes->e_entry);
427 if ((execp->a_trsize == 0 || execp->a_text == 0)
428 && (execp->a_drsize == 0 || execp->a_data == 0))
430 else if (execp->a_trsize == execp->a_text
431 && execp->a_drsize == execp->a_data)
463 struct internal_exec *execp,
485 *(abfd->tdata.aout_data->a.hdr) = *execp; /* Copy in the internal_exec struct. */
486 execp = abfd->tdata.aout_data->a.hdr;
490 if (execp->a_drsize || execp->a_trsize)
493 if (execp->a_syms)
495 if (N_DYNAMIC(*execp))
498 if (N_MAGIC (*execp) == ZMAGIC)
503 else if (N_MAGIC (*execp) == NMAGIC)
508 else if (N_MAGIC (*execp) == OMAGIC)
517 bfd_get_start_address (abfd) = execp->a_entry;
520 bfd_get_symcount (abfd) = execp->a_syms / sizeof (struct external_nlist);
540 obj_datasec (abfd)->size = execp->a_data;
541 obj_bsssec (abfd)->size = execp->a_bss;
544 (execp->a_trsize != 0
548 (execp->a_drsize != 0
563 struct exec *execp = exec_hdr (abfd);
565 obj_textsec (abfd)->size = N_TXTSIZE(*execp);
569 obj_textsec (abfd)->vma = N_TXTADDR(*execp);
570 obj_datasec (abfd)->vma = N_DATADDR(*execp);
571 obj_bsssec (abfd)->vma = N_BSSADDR(*execp);
574 obj_textsec (abfd)->filepos = N_TXTOFF(*execp);
575 obj_datasec (abfd)->filepos = N_DATOFF(*execp);
578 obj_textsec (abfd)->rel_filepos = N_TRELOFF(*execp);
579 obj_datasec (abfd)->rel_filepos = N_DRELOFF(*execp);
582 obj_str_filepos (abfd) = N_STROFF (*execp);
583 obj_sym_filepos (abfd) = N_SYMOFF (*execp);
621 if (execp->a_entry != 0
622 || (execp->a_entry >= obj_textsec(abfd)->vma
623 && execp->a_entry < obj_textsec(abfd)->vma + obj_textsec(abfd)->size))
807 adjust_o_magic (bfd *abfd, struct internal_exec *execp)
860 execp->a_text = obj_textsec (abfd)->size;
861 execp->a_data = obj_datasec (abfd)->size;
862 execp->a_bss = obj_bsssec (abfd)->size;
863 N_SET_MAGIC (*execp, OMAGIC);
867 adjust_z_magic (bfd *abfd, struct internal_exec *execp)
944 execp->a_text = obj_textsec(abfd)->size;
946 execp->a_text += adata(abfd).exec_bytes_size;
947 N_SET_MAGIC (*execp, ZMAGIC);
953 execp->a_data = BFD_ALIGN (obj_datasec(abfd)->size,
955 data_pad = execp->a_data - obj_datasec(abfd)->size;
970 execp->a_bss = (data_pad > obj_bsssec(abfd)->size) ? 0 :
973 execp->a_bss = obj_bsssec(abfd)->size;
977 adjust_n_magic (bfd *abfd, struct internal_exec *execp)
1011 execp->a_text = obj_textsec(abfd)->size;
1012 execp->a_data = obj_datasec(abfd)->size;
1013 execp->a_bss = obj_bsssec(abfd)->size;
1014 N_SET_MAGIC (*execp, NMAGIC);
1022 struct internal_exec *execp = exec_hdr (abfd);
1080 adjust_o_magic (abfd, execp);
1083 adjust_z_magic (abfd, execp);
1086 adjust_n_magic (abfd, execp);