1 /* $NetBSD: som.h,v 1.1 2002/06/05 01:04:23 fredette Exp $ */
3 /* $OpenBSD: som.h,v 1.3 1999/12/23 04:09:44 mickey Exp $ */
6 * Copyright (c) 1998 Michael Shalayeff
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 * IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT,
22 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24 * SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28 * THE POSSIBILITY OF SUCH DAMAGE.
36 #define SOM_PA10 0x20b
37 #define SOM_PA11 0x210
38 #define SOM_PA12 0x211
39 #define SOM_PA20 0x214
42 #define SOM_MAGIC 0x107
43 #define SOM_SHARED 0x108
44 #define SOM_DEMAND 0x10B
46 #define SOM_BADMAGIC(fh) \
47 ((fh)->system_id != SOM_PA10 && \
48 (fh)->system_id != SOM_PA11 && \
49 (fh)->system_id != SOM_PA12 && \
50 (fh)->system_id != SOM_PA20)
56 u_int time_secs
; /* sys time (zero if unused) */
58 u_int ep_space
; /* ep space */
60 u_int entry
; /* how is it different from a_entry? */
61 u_int aux_loc
; /* aux header location */
63 u_int som_length
; /* entire image length */
64 u_int dp
; /* dp presumed at compilation time */
65 u_int space_loc
; /* space dictionary location */
66 u_int space_total
; /* N of entries in the space dict */
67 u_int subspace_loc
; /* subspace dict location */
68 u_int subspace_total
; /* N of entries in the subspace dict */
69 u_int ld_fixup_loc
; /* space ref array (relocs?) */
70 u_int ld_fixup_total
; /* N of space ref records */
71 u_int space_str_loc
; /* {,sub}space string table location */
72 u_int space_str_size
; /* size of the above */
73 u_int init_loc
; /* init ptrs location */
74 u_int init_total
; /* N of entries in the above */
75 u_int dict_loc
; /* module dictionary location */
76 u_int dict_total
; /* number of modules */
77 u_int sym_loc
; /* symbol table location */
78 u_int sym_total
; /* N of symbols */
79 u_int fixup_loc
; /* fixpup reqs location */
80 u_int fixup_total
; /* N of the fixup reqs */
81 u_int strings_loc
; /* string table location */
82 u_int strings_size
; /* size of the strings table */
83 u_int unloadable_loc
; /* unloadable spaces location */
84 u_int unloadable_size
; /* size of the unloadable spaces */
85 u_int checksum
; /* header checksum? */
111 u_int sym_chklevel
: 3;
112 u_int sym_qualify
: 1;
113 u_int sym_ifrozen
: 1;
114 u_int sym_resident
: 1;
115 u_int sym_is_common
: 1;
116 u_int sym_dup_common
: 1;
117 u_int sym_xleast
: 2;
118 u_int sym_arg_reloc
: 10;
122 } sym_name
, sym_qualifier_name
;
129 #define SOM_ST_NULL 0
131 #define SOM_ST_DATA 2
132 #define SOM_ST_CODE 3
133 #define SOM_ST_PRI_PROG 4
134 #define SOM_ST_SEC_PROG 5
135 #define SOM_ST_ENTRY 6
136 #define SOM_ST_STORAGE 7
137 #define SOM_ST_STUB 8
138 #define SOM_ST_MODULE 9
139 #define SOM_ST_SYM_EXT 10
140 #define SOM_ST_ARG_EXT 11
141 #define SOM_ST_MILLICODE 12
142 #define SOM_ST_PLABEL 13
145 #define SOM_SS_UNSAT 0
146 #define SOM_SS_EXTERNAL 1
147 #define SOM_SS_GLOBAL 2
148 #define SOM_SS_UNIVERSAL 3
150 #endif /* _HPPA_SOM_H_ */