* Copyright (c) 1992 Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* %sccs.include.redist.c%
* @(#)coff.c 7.1 (Berkeley) %G%
* Print header info for coff files.
register struct devices
*dp
;
printf("usage: %s <file>\n");
if ((fd
= open(fname
= argv
[1], 0)) < 0)
/* read the COFF header */
i
= read(fd
, (char *)&aout
, sizeof(aout
));
printf("No a.out header\n");
printf("HDR: magic 0x%x(0%o) nsec %d nsym %d optheader %d textoff %x\n",
aout
.ex_fhdr
.numSections
,
printf("A.out: magic 0x%x(0%o) ver %d entry %x gprM %x gpV %x\n",
printf("\tstart %x,%x,%x size %d+%d+%d\n",