xref: /titanic_41/usr/src/cmd/sgs/include/a.out.h (revision 4a6822d07d6d3f9ffe6907ef5f10d11dcadd75c6)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  *	Copyright (c) 1991 by Sun Microsystems, Inc.
24  */
25 
26 #pragma ident	"%Z%%M%	%I%	%E% SMI"
27 
28 #ifndef	A_DOT_OUT_DOT_H
29 #define	A_DOT_OUT_DOT_H
30 
31 struct exec {
32 #ifdef	sun
33 	unsigned char	a_dynamic:1;	/* has a __DYNAMIC */
34 	unsigned char	a_toolversion:7; /* version of toolset used to create */
35 					/*	this file */
36 	unsigned char	a_machtype;	/* machine type */
37 	unsigned short	a_magic;	/* magic number */
38 #else
39 	unsigned long	a_magic;	/* magic number */
40 #endif
41 	unsigned long	a_text;		/* size of text segment */
42 	unsigned long	a_data;		/* size of initialized data */
43 	unsigned long	a_bss;		/* size of uninitialized data */
44 	unsigned long	a_syms;		/* size of symbol table */
45 	unsigned long	a_entry;	/* entry point */
46 	unsigned long	a_trsize;	/* size of text relocation */
47 	unsigned long	a_drsize;	/* size of data relocation */
48 };
49 
50 /*
51  * Macros for identifying an a.out format file.
52  */
53 #define	M_SPARC	3			/* runs only on SPARC */
54 #define	OMAGIC	0407			/* old impure format */
55 #define	NMAGIC	0410			/* read-only text */
56 #define	ZMAGIC	0413			/* demand load format */
57 
58 #define	N_BADMAG(x) \
59 	((x).a_magic != OMAGIC && (x).a_magic != NMAGIC && \
60 	(x).a_magic != ZMAGIC)
61 
62 /*
63  * Page size for a.out (used to overide machdep.h definition).
64  */
65 #ifndef	M_SEGSIZE
66 #define	M_SEGSIZE	0x2000		/* 8k */
67 #endif
68 
69 #endif
70