Mercurial > illumos > illumos-gate
diff 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 |
line wrap: on
line diff
--- a/usr/src/cmd/sgs/include/sparc/machdep_sparc.h Mon Aug 02 13:32:36 2010 -0700 +++ b/usr/src/cmd/sgs/include/sparc/machdep_sparc.h Mon Aug 02 14:04:48 2010 -0700 @@ -23,8 +23,7 @@ * Copyright (c) 1988 AT&T * All Rights Reserved * - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. * * Global include file for all sgs SPARC machine dependent macros, constants * and declarations. @@ -195,30 +194,33 @@ #define M_STACK_PERM (PF_R | PF_W | PF_X) #endif - /* * Define a set of identifies for special sections. These allow the sections * to be ordered within the output file image. These values should be * maintained consistently, where appropriate, in each platform specific header * file. * - * o null identifies that this section does not need to be added to the + * - null identifies that this section does not need to be added to the * output image (ie. shared object sections or sections we're going to * recreate (sym tables, string tables, relocations, etc.)). * - * o any user defined section will be first in the associated segment. + * - any user defined section will be first in the associated segment. * - * o interp and capabilities sections are next, as these are accessed + * - interp and capabilities sections are next, as these are accessed * immediately the first page of the image is mapped. * - * o the syminfo, hash, dynsym, dynstr and rel's are grouped together as - * these will all be accessed first by ld.so.1 to perform relocations. + * - objects that do not provide an interp normally have a read-only + * .dynamic section that comes next (in this case, there is no need to + * update a DT_DEBUG entry at runtime). * - * o the got, dynamic, and plt are grouped together as these may also be + * - the syminfo, hash, dynsym, dynstr and rel's are grouped together as + * these will all be accessed together by ld.so.1 to perform relocations. + * + * - the got, dynamic, and plt are grouped together as these may also be * accessed first by ld.so.1 to perform relocations, fill in DT_DEBUG * (executables only), and .plt[0]. * - * o unknown sections (stabs, comments etc.) go at the end. + * - unknown sections (stabs, comments, etc.) go at the end. * * Note that .tlsbss/.bss are given the largest identifiers. This insures that * if any unknown sections become associated to the same segment as the .bss, @@ -229,19 +231,23 @@ #define M_ID_INTERP 0x02 /* SHF_ALLOC */ #define M_ID_CAP 0x03 +#define M_ID_CAPINFO 0x04 +#define M_ID_CAPCHAIN 0x05 -#define M_ID_UNWINDHDR 0x06 -#define M_ID_UNWIND 0x07 -#define M_ID_CAPINFO 0x08 -#define M_ID_CAPCHAIN 0x09 -#define M_ID_SYMINFO 0x0a -#define M_ID_HASH 0x0b -#define M_ID_LDYNSYM 0x0c /* always right before DYNSYM */ -#define M_ID_DYNSYM 0x0d -#define M_ID_DYNSTR 0x0e -#define M_ID_VERSION 0x0f -#define M_ID_DYNSORT 0x10 -#define M_ID_REL 0x11 +#define M_ID_DYNAMIC 0x06 /* if no .interp, then no */ + /* DT_DEBUG is required */ +#define M_ID_UNWINDHDR 0x07 +#define M_ID_UNWIND 0x08 + +#define M_ID_SYMINFO 0x09 +#define M_ID_HASH 0x0a +#define M_ID_LDYNSYM 0x0b /* always right before DYNSYM */ +#define M_ID_DYNSYM 0x0c +#define M_ID_DYNSTR 0x0d +#define M_ID_VERSION 0x0e +#define M_ID_DYNSORT 0x0f +#define M_ID_REL 0x10 +#define M_ID_ARRAY 0x11 #define M_ID_TEXT 0x12 /* SHF_ALLOC + SHF_EXECINSTR */ #define M_ID_DATA 0x20 @@ -249,9 +255,8 @@ #define M_ID_GOTDATA 0x02 /* SHF_ALLOC + SHF_WRITE */ #define M_ID_GOT 0x03 #define M_ID_PLT 0x04 -#define M_ID_DYNAMIC 0x05 -#define M_ID_ARRAY 0x06 -/* M_ID_UNWIND 0x07 dual entry - listed above */ +/* M_ID_DYNAMIC 0x06 dual entry - listed above */ +/* M_ID_UNWIND 0x08 dual entry - listed above */ #define M_ID_UNKNOWN 0xfc /* just before TLS */