Mercurial > illumos > illumos-gate
comparison usr/src/cmd/sgs/include/sparc/machdep_sparc.h @ 13004:92dfdb3a48cc
6935867 .dynamic could be readonly in sharable objects
author | Rod Evans <Rod.Evans@Oracle.COM> |
---|---|
date | Mon, 02 Aug 2010 14:04:48 -0700 |
parents | d7ef53deac3f |
children |
comparison
equal
deleted
inserted
replaced
13003:b4084e8201cf | 13004:92dfdb3a48cc |
---|---|
21 | 21 |
22 /* | 22 /* |
23 * Copyright (c) 1988 AT&T | 23 * Copyright (c) 1988 AT&T |
24 * All Rights Reserved | 24 * All Rights Reserved |
25 * | 25 * |
26 * Copyright 2010 Sun Microsystems, Inc. All rights reserved. | 26 * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. |
27 * Use is subject to license terms. | |
28 * | 27 * |
29 * Global include file for all sgs SPARC machine dependent macros, constants | 28 * Global include file for all sgs SPARC machine dependent macros, constants |
30 * and declarations. | 29 * and declarations. |
31 */ | 30 */ |
32 | 31 |
193 #define M_STACK_PERM (PF_R | PF_W) | 192 #define M_STACK_PERM (PF_R | PF_W) |
194 #else | 193 #else |
195 #define M_STACK_PERM (PF_R | PF_W | PF_X) | 194 #define M_STACK_PERM (PF_R | PF_W | PF_X) |
196 #endif | 195 #endif |
197 | 196 |
198 | |
199 /* | 197 /* |
200 * Define a set of identifies for special sections. These allow the sections | 198 * Define a set of identifies for special sections. These allow the sections |
201 * to be ordered within the output file image. These values should be | 199 * to be ordered within the output file image. These values should be |
202 * maintained consistently, where appropriate, in each platform specific header | 200 * maintained consistently, where appropriate, in each platform specific header |
203 * file. | 201 * file. |
204 * | 202 * |
205 * o null identifies that this section does not need to be added to the | 203 * - null identifies that this section does not need to be added to the |
206 * output image (ie. shared object sections or sections we're going to | 204 * output image (ie. shared object sections or sections we're going to |
207 * recreate (sym tables, string tables, relocations, etc.)). | 205 * recreate (sym tables, string tables, relocations, etc.)). |
208 * | 206 * |
209 * o any user defined section will be first in the associated segment. | 207 * - any user defined section will be first in the associated segment. |
210 * | 208 * |
211 * o interp and capabilities sections are next, as these are accessed | 209 * - interp and capabilities sections are next, as these are accessed |
212 * immediately the first page of the image is mapped. | 210 * immediately the first page of the image is mapped. |
213 * | 211 * |
214 * o the syminfo, hash, dynsym, dynstr and rel's are grouped together as | 212 * - objects that do not provide an interp normally have a read-only |
215 * these will all be accessed first by ld.so.1 to perform relocations. | 213 * .dynamic section that comes next (in this case, there is no need to |
216 * | 214 * update a DT_DEBUG entry at runtime). |
217 * o the got, dynamic, and plt are grouped together as these may also be | 215 * |
216 * - the syminfo, hash, dynsym, dynstr and rel's are grouped together as | |
217 * these will all be accessed together by ld.so.1 to perform relocations. | |
218 * | |
219 * - the got, dynamic, and plt are grouped together as these may also be | |
218 * accessed first by ld.so.1 to perform relocations, fill in DT_DEBUG | 220 * accessed first by ld.so.1 to perform relocations, fill in DT_DEBUG |
219 * (executables only), and .plt[0]. | 221 * (executables only), and .plt[0]. |
220 * | 222 * |
221 * o unknown sections (stabs, comments etc.) go at the end. | 223 * - unknown sections (stabs, comments, etc.) go at the end. |
222 * | 224 * |
223 * Note that .tlsbss/.bss are given the largest identifiers. This insures that | 225 * Note that .tlsbss/.bss are given the largest identifiers. This insures that |
224 * if any unknown sections become associated to the same segment as the .bss, | 226 * if any unknown sections become associated to the same segment as the .bss, |
225 * the .bss sections are always the last section in the segment. | 227 * the .bss sections are always the last section in the segment. |
226 */ | 228 */ |
227 #define M_ID_NULL 0x00 | 229 #define M_ID_NULL 0x00 |
228 #define M_ID_USER 0x01 | 230 #define M_ID_USER 0x01 |
229 | 231 |
230 #define M_ID_INTERP 0x02 /* SHF_ALLOC */ | 232 #define M_ID_INTERP 0x02 /* SHF_ALLOC */ |
231 #define M_ID_CAP 0x03 | 233 #define M_ID_CAP 0x03 |
232 | 234 #define M_ID_CAPINFO 0x04 |
233 #define M_ID_UNWINDHDR 0x06 | 235 #define M_ID_CAPCHAIN 0x05 |
234 #define M_ID_UNWIND 0x07 | 236 |
235 #define M_ID_CAPINFO 0x08 | 237 #define M_ID_DYNAMIC 0x06 /* if no .interp, then no */ |
236 #define M_ID_CAPCHAIN 0x09 | 238 /* DT_DEBUG is required */ |
237 #define M_ID_SYMINFO 0x0a | 239 #define M_ID_UNWINDHDR 0x07 |
238 #define M_ID_HASH 0x0b | 240 #define M_ID_UNWIND 0x08 |
239 #define M_ID_LDYNSYM 0x0c /* always right before DYNSYM */ | 241 |
240 #define M_ID_DYNSYM 0x0d | 242 #define M_ID_SYMINFO 0x09 |
241 #define M_ID_DYNSTR 0x0e | 243 #define M_ID_HASH 0x0a |
242 #define M_ID_VERSION 0x0f | 244 #define M_ID_LDYNSYM 0x0b /* always right before DYNSYM */ |
243 #define M_ID_DYNSORT 0x10 | 245 #define M_ID_DYNSYM 0x0c |
244 #define M_ID_REL 0x11 | 246 #define M_ID_DYNSTR 0x0d |
247 #define M_ID_VERSION 0x0e | |
248 #define M_ID_DYNSORT 0x0f | |
249 #define M_ID_REL 0x10 | |
250 #define M_ID_ARRAY 0x11 | |
245 #define M_ID_TEXT 0x12 /* SHF_ALLOC + SHF_EXECINSTR */ | 251 #define M_ID_TEXT 0x12 /* SHF_ALLOC + SHF_EXECINSTR */ |
246 #define M_ID_DATA 0x20 | 252 #define M_ID_DATA 0x20 |
247 | 253 |
248 /* M_ID_USER 0x01 dual entry - listed above */ | 254 /* M_ID_USER 0x01 dual entry - listed above */ |
249 #define M_ID_GOTDATA 0x02 /* SHF_ALLOC + SHF_WRITE */ | 255 #define M_ID_GOTDATA 0x02 /* SHF_ALLOC + SHF_WRITE */ |
250 #define M_ID_GOT 0x03 | 256 #define M_ID_GOT 0x03 |
251 #define M_ID_PLT 0x04 | 257 #define M_ID_PLT 0x04 |
252 #define M_ID_DYNAMIC 0x05 | 258 /* M_ID_DYNAMIC 0x06 dual entry - listed above */ |
253 #define M_ID_ARRAY 0x06 | 259 /* M_ID_UNWIND 0x08 dual entry - listed above */ |
254 /* M_ID_UNWIND 0x07 dual entry - listed above */ | |
255 | 260 |
256 #define M_ID_UNKNOWN 0xfc /* just before TLS */ | 261 #define M_ID_UNKNOWN 0xfc /* just before TLS */ |
257 | 262 |
258 #define M_ID_TLS 0xfd /* just before bss */ | 263 #define M_ID_TLS 0xfd /* just before bss */ |
259 #define M_ID_TLSBSS 0xfe | 264 #define M_ID_TLSBSS 0xfe |