Lines Matching refs:ex
340 const struct exec *ex; in gethdr() local
360 ex = p; in gethdr()
361 if (hdr->size >= sizeof(struct exec) && !N_BADMAG(*ex)) { in gethdr()
363 x = N_GETMAGIC(*ex); in gethdr()
370 hdr->text = le32toh(ex->a_text); in gethdr()
371 hdr->data = le32toh(ex->a_data); in gethdr()
372 hdr->bss = le32toh(ex->a_bss); in gethdr()
373 hdr->entry = le32toh(ex->a_entry); in gethdr()
374 if (le32toh(ex->a_entry) >= BTX_PGSIZE) in gethdr()
417 struct exec ex; in puthdr() local
422 memset(&ex, 0, sizeof(ex)); in puthdr()
423 N_SETMAGIC(ex, ZMAGIC, MID_I386, 0); in puthdr()
424 hdr->text = N_ALIGN(ex, hdr->text); in puthdr()
425 ex.a_text = htole32(hdr->text); in puthdr()
426 hdr->data = N_ALIGN(ex, hdr->data); in puthdr()
427 ex.a_data = htole32(hdr->data); in puthdr()
428 ex.a_entry = htole32(hdr->entry); in puthdr()
429 writex(fd, &ex, sizeof(ex)); in puthdr()
430 hdr->size = N_ALIGN(ex, sizeof(ex)); in puthdr()