xref: /titanic_52/usr/src/lib/storage/liba5k/common/hdrs/exec.h (revision fcf3ce441efd61da9bb2884968af01cb7c1452cc)
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 (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 /*
27  * SPARCstorage Array exec.h file
28  */
29 
30 #ifndef	_EXEC_H
31 #define	_EXEC_H
32 
33 
34 /*
35  * Include any headers you depend on.
36  */
37 
38 /*
39  * I18N message number ranges
40  *  This file: 17000 - 17499
41  *  Shared common messages: 1 - 1999
42  */
43 
44 #ifdef	__cplusplus
45 extern "C" {
46 #endif
47 
48 
49 /*
50  * format of the exec header
51  * known by kernel and by user programs
52  */
53 struct exec {
54 #ifdef sun
55 	unsigned char	a_dynamic:1;	/* has a __DYNAMIC */
56 	unsigned char	a_toolversion:7; /* ver of toolset used to create */
57 	unsigned char	a_machtype;	/* machine type */
58 	unsigned short	a_magic;	/* magic number */
59 #else
60 	unsigned long	a_magic;	/* magic number */
61 #endif
62 	unsigned long	a_text;		/* size of text segment */
63 	unsigned long	a_data;		/* size of initialized data */
64 	unsigned long	a_bss;		/* size of uninitialized data */
65 	unsigned long	a_syms;		/* size of symbol table */
66 	unsigned long	a_entry;	/* entry point */
67 	unsigned long	a_trsize;	/* size of text relocation */
68 	unsigned long	a_drsize;	/* size of data relocation */
69 };
70 
71 #define	OMAGIC	0407		/* old impure format */
72 #define	NMAGIC	0410		/* read-only text */
73 #define	ZMAGIC	0413		/* demand load format */
74 
75 /* machine types */
76 
77 #ifdef sun
78 #define	M_OLDSUN2	0	/* old sun-2 executable files */
79 #define	M_68010		1	/* runs on either 68010 or 68020 */
80 #define	M_68020		2	/* runs only on 68020 */
81 #define	M_SPARC		3	/* runs only on SPARC */
82 
83 #define	TV_SUN2_SUN3	0
84 #define	TV_SUN4		1
85 #endif /* sun */
86 
87 
88 #ifdef	__cplusplus
89 }
90 #endif
91 
92 #endif	/* _EXEC_H */
93