Print this page
remove support for non-ANSI compilation
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/auxv.h
+++ new/usr/src/uts/common/sys/auxv.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
22 22 /* All Rights Reserved */
23 23
24 24
25 25 /*
26 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
27 + *
26 28 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
27 29 * Use is subject to license terms.
28 30 */
29 31 /*
30 32 * Copyright (c) 2012, Joyent, Inc. All rights reserved.
31 33 */
32 34
33 35 #ifndef _SYS_AUXV_H
34 36 #define _SYS_AUXV_H
35 37
36 38 #include <sys/types.h>
37 39
↓ open down ↓ |
2 lines elided |
↑ open up ↑ |
38 40 #ifdef __cplusplus
39 41 extern "C" {
40 42 #endif
41 43
42 44 #if !defined(_ASM)
43 45 typedef struct
44 46 {
45 47 int a_type;
46 48 union {
47 49 long a_val;
48 -#ifdef __STDC__
49 50 void *a_ptr;
50 -#else
51 - char *a_ptr;
52 -#endif
53 51 void (*a_fcn)();
54 52 } a_un;
55 53 } auxv_t;
56 54
57 55 #if defined(_SYSCALL32)
58 56
59 57 typedef struct {
60 58 int32_t a_type;
61 59 union {
62 60 int32_t a_val;
63 61 caddr32_t a_ptr;
64 62 caddr32_t a_fcn;
65 63 } a_un;
66 64 } auxv32_t;
67 65
68 66 #endif /* _SYSCALL32 */
69 67
70 68 #endif /* _ASM */
71 69
72 70 #define AT_NULL 0
73 71 #define AT_IGNORE 1
74 72 #define AT_EXECFD 2
75 73 #define AT_PHDR 3 /* &phdr[0] */
76 74 #define AT_PHENT 4 /* sizeof(phdr[0]) */
77 75 #define AT_PHNUM 5 /* # phdr entries */
78 76 #define AT_PAGESZ 6 /* getpagesize(2) */
79 77 #define AT_BASE 7 /* ld.so base addr */
80 78 #define AT_FLAGS 8 /* processor flags */
81 79 #define AT_ENTRY 9 /* a.out entry point */
82 80
83 81 /*
84 82 * These relate to the original PPC ABI document; Linux reused
85 83 * the values for other things (see below), so disambiguation of
86 84 * these values may require additional context in PPC binaries.
87 85 *
88 86 * AT_DCACHEBSIZE 10 smallest data cache block size
89 87 * AT_ICACHEBSIZE 11 smallest instruction cache block size
90 88 * AT_UCACHEBSIZE 12 smallest unified cache block size
91 89 *
92 90 * These are the values from LSB 1.3, the first five are also described
93 91 * in the draft amd64 ABI.
94 92 *
95 93 * At the time of writing, Solaris doesn't place any of these values into
96 94 * the aux vector, except AT_CLKTCK which is placed on the aux vector for
97 95 * lx branded processes; also, we do similar things via AT_SUN_ values.
98 96 *
99 97 * AT_NOTELF 10 program is not ELF?
100 98 * AT_UID 11 real user id
101 99 * AT_EUID 12 effective user id
102 100 * AT_GID 13 real group id
103 101 * AT_EGID 14 effective group id
104 102 *
105 103 * AT_PLATFORM 15
106 104 * AT_HWCAP 16
107 105 * AT_CLKTCK 17 c.f. _SC_CLK_TCK
108 106 * AT_FPUCW 18
109 107 *
110 108 * AT_DCACHEBSIZE 19 (moved from 10)
111 109 * AT_ICACHEBSIZE 20 (moved from 11)
112 110 * AT_UCACHEBSIZE 21 (moved from 12)
113 111 *
114 112 * AT_IGNOREPPC 22
115 113 */
116 114
117 115 /*
118 116 * Sun extensions begin here
119 117 */
120 118 #define AT_SUN_UID 2000 /* effective user id */
121 119 #define AT_SUN_RUID 2001 /* real user id */
122 120 #define AT_SUN_GID 2002 /* effective group id */
123 121 #define AT_SUN_RGID 2003 /* real group id */
124 122
125 123 /*
126 124 * The following attributes are specific to the
127 125 * kernel implementation of the linker/loader.
128 126 */
129 127 #define AT_SUN_LDELF 2004 /* dynamic linker's ELF header */
130 128 #define AT_SUN_LDSHDR 2005 /* dynamic linker's section headers */
131 129 #define AT_SUN_LDNAME 2006 /* name of dynamic linker */
132 130 #define AT_SUN_LPAGESZ 2007 /* large pagesize */
133 131 /*
134 132 * The following aux vector provides a null-terminated platform
135 133 * identification string. This information is the same as provided
136 134 * by sysinfo(2) when invoked with the command SI_PLATFORM.
137 135 */
138 136 #define AT_SUN_PLATFORM 2008 /* platform name */
139 137
140 138 /*
141 139 * These attributes communicate performance -hints- about processor
142 140 * hardware capabilities that might be useful to library implementations.
143 141 */
144 142 #define AT_SUN_HWCAP 2009
145 143 #define AT_SUN_HWCAP2 2023
146 144
147 145 #if defined(_KERNEL)
148 146 /*
149 147 * User info regarding machine attributes, respectively reported to native and
150 148 * non-native user apps.
151 149 */
152 150 extern uint_t auxv_hwcap;
153 151 extern uint_t auxv_hwcap_2;
154 152 #if defined(_SYSCALL32)
155 153 extern uint_t auxv_hwcap32;
156 154 extern uint_t auxv_hwcap32_2;
157 155 #endif /* _SYSCALL32 */
158 156 #else
159 157 extern uint_t getisax(uint32_t *, uint_t);
160 158 #endif /* _KERNEL */
161 159
162 160 #define AT_SUN_IFLUSH 2010 /* flush icache? */
163 161 #define AT_SUN_CPU 2011 /* cpu name */
164 162
165 163 /*
166 164 * The following aux vector provides a pointer to a null-terminated
167 165 * path name, a copy of the path name passed to the exec() system
168 166 * call but that has had all symlinks resolved (see resolvepath(2)).
169 167 */
170 168 #define AT_SUN_EXECNAME 2014 /* exec() path name */
171 169
172 170 #define AT_SUN_MMU 2015 /* mmu module name */
173 171 #define AT_SUN_LDDATA 2016 /* dynamic linkers data segment */
174 172
175 173 #define AT_SUN_AUXFLAGS 2017 /* AF_SUN_ flags passed from the kernel */
176 174
177 175 /*
178 176 * Used to indicate to the runtime linker the name of the emulation binary,
179 177 * if one is being used. For brands, this is the name of the brand library.
180 178 */
181 179 #define AT_SUN_EMULATOR 2018
182 180
183 181 #define AT_SUN_BRANDNAME 2019
184 182
185 183 /*
186 184 * Aux vectors available for brand modules.
187 185 */
188 186 #define AT_SUN_BRAND_AUX1 2020
189 187 #define AT_SUN_BRAND_AUX2 2021
190 188 #define AT_SUN_BRAND_AUX3 2022
191 189
192 190 /*
193 191 * Note that 2023 is reserved for the AT_SUN_HWCAP2 word defined above.
194 192 */
195 193
196 194 /*
197 195 * The kernel is in a better position to determine whether a process needs to
198 196 * ignore dangerous LD environment variables. If set, this flags tells
199 197 * ld.so.1 to run "secure" and ignore the the environment.
200 198 */
201 199 #define AF_SUN_SETUGID 0x00000001
202 200
203 201 /*
204 202 * If set, this flag indicates that hardware capabilites can be verified
205 203 * against the AT_SUN_HWCAP value.
206 204 */
207 205 #define AF_SUN_HWCAPVERIFY 0x00000002
208 206
209 207 /*
210 208 * If set, this flag indicates that the the linker should not initialize
211 209 * any of its link maps as primary link wrt the unified libc threading
212 210 * interfaces.
213 211 */
214 212 #define AF_SUN_NOPLM 0x00000004
215 213
216 214 #ifdef __cplusplus
217 215 }
218 216 #endif
219 217
220 218 #if defined(_AUXV_TARGET_ALL) || defined(_AUXV_TARGET_SPARC) || defined(__sparc)
221 219 #include <sys/auxv_SPARC.h>
222 220 #endif
223 221
224 222 #if defined(_AUXV_TARGET_ALL) || defined(_AUXV_TARGET_386) || defined(__x86)
225 223 #include <sys/auxv_386.h>
226 224 #endif
227 225
228 226 #endif /* _SYS_AUXV_H */
↓ open down ↓ |
166 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX