xref: /titanic_44/usr/src/lib/libbc/inc/include/sys/exec.h (revision 1cb6af97c6f66f456d4f726ef056e1ebc0f73305)
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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
23 
24 /*
25  * Copyright (c) 1985 by Sun Microsystems, Inc.
26  */
27 
28 #ifndef _sys_exec_h
29 #define _sys_exec_h
30 
31 /*
32  * format of the exec header
33  * known by kernel and by user programs
34  */
35 struct exec {
36 #ifdef sun
37 	unsigned char	a_dynamic:1;	/* has a __DYNAMIC */
38 	unsigned char	a_toolversion:7;/* version of toolset used to create this file */
39 	unsigned char	a_machtype;	/* machine type */
40 	unsigned short	a_magic;	/* magic number */
41 #else
42 	unsigned long	a_magic;	/* magic number */
43 #endif
44 	unsigned long	a_text;		/* size of text segment */
45 	unsigned long	a_data;		/* size of initialized data */
46 	unsigned long	a_bss;		/* size of uninitialized data */
47 	unsigned long	a_syms;		/* size of symbol table */
48 	unsigned long	a_entry;	/* entry point */
49 	unsigned long	a_trsize;	/* size of text relocation */
50 	unsigned long	a_drsize;	/* size of data relocation */
51 };
52 
53 #define	OMAGIC	0407		/* old impure format */
54 #define	NMAGIC	0410		/* read-only text */
55 #define	ZMAGIC	0413		/* demand load format */
56 
57 /* machine types */
58 
59 #ifdef sun
60 #define M_OLDSUN2	0	/* old sun-2 executable files */
61 #define M_68010		1	/* runs on either 68010 or 68020 */
62 #define M_68020		2	/* runs only on 68020 */
63 #define M_SPARC		3	/* runs only on SPARC */
64 
65 #define TV_SUN2_SUN3	0
66 #define TV_SUN4		1
67 #endif sun
68 
69 #endif /*!_sys_exec_h*/
70