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.
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.
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]
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
35 * Libc/rtld Runtime Interface
37 #define CI_NULL 0 /* (void) last entry */
38 #define CI_VERSION 1 /* current version of ri_interface */
39 #define CI_ATEXIT 2 /* _preexec_exit_handlers() address */
40 #define CI_LCMESSAGES 3 /* message locale */
41 #define CI_BIND_GUARD 4 /* bind_guard() address */
42 #define CI_BIND_CLEAR 5 /* bind_clear() address */
43 #define CI_THR_SELF 6 /* thr_self() address */
44 #define CI_TLS_MODADD 7 /* __tls_mod_add() address */
45 #define CI_TLS_MODREM 8 /* __tls_mod_remove() address */
46 #define CI_TLS_STATMOD 9 /* __tls_static_mods() address */
47 #define CI_THRINIT 10 /* libc thread initialization */
48 #define CI_CRITICAL 11 /* critical level query interface */
52 #define CI_V_NONE 0 /* ci_version versions */
53 #define CI_V_ONE 1 /* original version */
59 #define CI_V_CURRENT CI_V_SIX /* current version of libc interface */
60 #define CI_V_NUM 7 /* number of CI_V_* numbers */
63 * Flags for the bindguard routines.
64 * THR_FLG_RTLD used to live in usr/src/cmd/sgs/rtld/common/_rtld.h
65 * THR_FLG_NOLOCK and THR_FLG_REENTER are new in version CI_V_FIVE.
67 #define THR_FLG_RTLD 0x00000001 /* bind_guard() flag */
68 #define THR_FLG_NOLOCK 0x00000002 /* don't use ld.so.1's lock */
69 #define THR_FLG_REENTER 0x00000004 /* temporary leave / reenter */
72 * Libc to ld.so.1 interface communication structure.
84 * Address range returned via CI_ATEXIT. Note, the address range array passed
85 * back from ld.so.1 is maintained by ld.so.1 and should not be freed by libc.
88 void * lb
; /* lower bound */
89 void * ub
; /* upper bound */
93 * Thread-Local storage data type and interfaces shared between
98 unsigned long ti_moduleid
; /* module ID for TLS var */
99 unsigned long ti_tlsoffset
; /* offset into tls block for TLS var */
104 const char *tm_modname
; /* name of object */
106 unsigned long tm_modid
; /* TLS module id */
107 void * tm_tlsblock
; /* pointer to r/o init image */
108 unsigned long tm_filesz
; /* initialized file size */
109 unsigned long tm_memsz
; /* memory size */
110 long tm_stattlsoffset
; /* signed offset into static */
112 unsigned long tm_flags
;
113 void * tm_tlsinitarray
; /* TLS .init function array */
114 unsigned long tm_tlsinitarraycnt
; /* # of entries in initarray */
115 void * tm_tlsfiniarray
; /* TLS .fini function array */
116 unsigned long tm_tlsfiniarraycnt
; /* # of entries in finiarray */
117 unsigned long tm_pad
[5]; /* future expansion */
122 caddr32_t tm_modname
; /* name of object */
124 uint32_t tm_modid
; /* TLS module id */
125 caddr32_t tm_tlsblock
; /* pointer to r/o init image */
126 uint32_t tm_filesz
; /* initialized file size */
127 uint32_t tm_memsz
; /* memory size */
128 int32_t tm_stattlsoffset
; /* signed offset into static */
131 caddr32_t tm_tlsinitarray
; /* TLS .init function array */
132 uint32_t tm_tlsinitarraycnt
; /* # of entries in initarray */
133 caddr32_t tm_tlsfiniarray
; /* TLS .fini function array */
134 uint32_t tm_tlsfiniarraycnt
; /* # of entries in finiarray */
135 uint32_t tm_pad
[5]; /* future expansion */
141 * Flag values for TLS_modifo.tm_flags
143 #define TM_FLG_STATICTLS 0x0001 /* Static TLS module */
150 #endif /* _LIBC_INT_H */