xref: /titanic_52/usr/src/lib/libbc/inc/include/sys/exec.h (revision 6185db853e024a486ff8837e6784dd290d866112)
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 1985 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _sys_exec_h
28 #define	_sys_exec_h
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 /*
33  * format of the exec header
34  * known by kernel and by user programs
35  */
36 struct exec {
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 	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 #define	OMAGIC	0407		/* old impure format */
51 #define	NMAGIC	0410		/* read-only text */
52 #define	ZMAGIC	0413		/* demand load format */
53 
54 /* machine types */
55 
56 #define M_OLDSUN2	0	/* old sun-2 executable files */
57 #define M_68010		1	/* runs on either 68010 or 68020 */
58 #define M_68020		2	/* runs only on 68020 */
59 #define M_SPARC		3	/* runs only on SPARC */
60 
61 #define TV_SUN2_SUN3	0
62 #define TV_SUN4		1
63 
64 #endif /* !_sys_exec_h */
65