home *** CD-ROM | disk | FTP | other *** search
- /*
- * Mildly edited outmix.h for use with Gnu ld
- * ++jrb
- * Thanks to meulenbr@cst.prl.philips.nl for all his help
- *
- * further refined: Thanks to Frans and Simon Poole for the info.
- * ++jrb 1/11/89
- */
-
- /*
- * output format for MINIX-PC and MINIX-ST.
- * for the i8088 longs are stored with low-order byte first.
- * for the 68000 longs are stored with high-order byte first.
- * this is a mess!
- * This MINIX format is a stripped down and mutilated version of
- * the Vrije Universiteit flavor of the ACK loadfile format.
- */
-
- struct aexec {
- long a_magic; /* contains a.out magic number */
- long a_versn; /* header length and version */
- long a_text; /* # bytes in program text segment */
- long a_data; /* # bytes in program data segment */
- long a_bss; /* # bytes in program bss segment */
- long a_entry; /* entry point */
- long a_msize; /* # bytes allocated for program */
- long a_syms; /* # bytes in symbol table */
- };
-
- #define A_MAGICD 0x04100301L /* combined I & D space */
- #define A_MAGICI 0x04200301L /* separate I & D space */
-
- #define CMAGIC A_MAGICD
-
- #define A_VERSION 0x00000020L
-
- /*
- * Macros which take exec structures as arguments and tell whether
- * the file has a reasonable magic number or offsets to text|symbols|strings.
- */
- #define A_BADMAG(x) (((x).a_magic)!=CMAGIC)
- #define A_TXTOFF(x) (sizeof (struct aexec))
- #define A_DATOFF(x) (A_TXTOFF(x) + (x).a_text)
- #define A_SYMOFF(x) (A_TXTOFF(x) + (x).a_text+(x).a_data)
- #define A_STROFF(x) (A_SYMOFF(x) + (x).a_syms)
-
- /*
- * this is really called stuct nlist in a.out.h, but we
- * cannot use that name as it conflicts with struct nlist of
- * gnu-out.h
- *
- */
- struct asym
- { char a_name[8]; /* symbol name */
- long a_value; /* symbol value */
- char a_sclass; /* storage class */
- char a_numaux; /* number of auxiliary entries */
- short a_type; /* language base and derived type */
- };
-
- /* low bits of a_sclass */
- #define A_UNDF 00 /* undefined */
- #define A_ABS 01 /* absolute */
- #define A_TEXT 02 /* text */
- #define A_DATA 03 /* data */
- #define A_BSS 04 /* bss */
- #define A_COMMON 05 /* common */
-
- /* high bits of a_sclass */
- #define A_CLASS 0370 /* mask */
- #define A_NULL
- #define A_EXT 0020 /* external */
- #define A_STAT 0030 /* static */
-
-