xref: /illumos-gate/usr/src/cmd/sgs/rtld/common/mapfile-vers (revision 9b9d39d2a32ff806d2431dbcc50968ef1e6d46b2)
1#
2# CDDL HEADER START
3#
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.
7#
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.
12#
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]
18#
19# CDDL HEADER END
20#
21
22#
23# Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
24#
25# Generic interface definition for usr/src/cmd/sgs/rtld.
26#
27
28#
29# MAPFILE HEADER START
30#
31# WARNING:  STOP NOW.  DO NOT MODIFY THIS FILE.
32# Object versioning must comply with the rules detailed in
33#
34#	usr/src/lib/README.mapfiles
35#
36# You should not be making modifications here until you've read the most current
37# copy of that file. If you need help, contact a gatekeeper for guidance.
38#
39# MAPFILE HEADER END
40#
41
42$mapfile_version 2
43
44#
45# All symbols in ld.so.1 are private as no-one should bind to these directly.
46#
47SYMBOL_VERSION SUNWprivate_1.3 {
48    protected:
49	dladdr;	# Standard dlopen(3x) family
50	dladdr1;
51	dldump;
52	dlclose;
53	dlerror;
54	dlinfo;
55	dlopen;
56	dlmopen;
57	dlsym;
58
59	_dladdr;	# these should not exist
60	_dladdr1;
61	_dldump;
62	_dlclose;
63	_dlerror;
64	_dlinfo;
65	_dlopen;
66	_dlmopen;
67	_dlsym;
68
69	_ld_libc;	# provides libc initialization
70
71	_elf_rtbndr;	# dbx expects to find these
72	elf_rtbndr;
73	_rt_boot;	# Provides basic adb symbol offsets
74
75	rtld_db_dlactivity;	# Required to support librtld_db
76	rtld_db_preinit;
77	rtld_db_postinit;
78	r_debug		{
79			  ASSERT = {
80				  TYPE = OBJECT;
81$if _x86 && _ELF32
82				  SIZE = 44;
83$elif _x86 && _ELF64
84				  SIZE = 80;
85$elif _sparc && _ELF32
86				  SIZE = 44;
87$elif _sparc && _ELF64
88				  SIZE = 80;
89$else
90$error Unknown platform
91$endif
92				};
93			};
94
95	elf_plt_write;
96	is_so_loaded;
97	lml_main	{
98			  ASSERT = {
99				  TYPE = OBJECT;
100$if _ELF32
101				  SIZE = addrsize[41];
102$elif _ELF64
103				  SIZE = addrsize[38];
104$else
105$error Unknown platform
106$endif
107				};
108			};
109	lookup_sym;
110
111	alist_append;	# librtld support
112	ld_entry_cnt	{ ASSERT = { TYPE = OBJECT; SIZE = addrsize; }; };
113	# Diagnostic support
114	dbg_desc	{ ASSERT = { TYPE = OBJECT; SIZE = addrsize; }; };
115	dbg_print;
116	eprintf;	# Error message printing
117	veprintf;
118
119	dgettext;	# Messaging support
120	strerror;
121
122	calloc;	# Memory management (mapmalloc).
123	free;
124	malloc;
125	realloc;
126
127	# PLT tracing getenv() support.
128	_environ	{ ASSERT = { TYPE = OBJECT; SIZE = addrsize; }; };
129	environ		{
130			  ASSERT = {
131				  BINDING = WEAK;
132				  ALIAS = _environ;
133				};
134			};
135
136	memcpy;	# Some routines are useful for support
137	snprintf;	# libraries such as liblddbg.
138	sprintf;	# Note that some of these functions
139	strcat;	# (like sprintf) may have reduced
140	strcmp;	# functionality over libc, as a simpler
141	strcpy;	# implementation is provided in ld.so.1.
142	strlen;
143	strrchr;
144	strtok_r;
145	___errno;
146	qsort;
147	dl_iterate_phdr;
148
149$if _x86 && _ELF64
150	# amd64 ABI exception unwinding
151	_dlamd64getunwind;
152	dlamd64getunwind;
153$endif
154
155	# doXX_reloc_rtld and relocXX_table are required to
156	# support librtld.so.
157$if _ELF32
158	do32_reloc_rtld;
159	reloc32_table	{
160			  ASSERT = {
161				  TYPE = OBJECT;
162$if _x86
163				  SIZE = addrsize[132];
164$elif _sparc
165				  SIZE = addrsize[264];
166$else
167$error Unknown architecture
168$endif
169				};
170			};
171$elif _ELF64
172	do64_reloc_rtld;
173	reloc64_table	{
174			  ASSERT = {
175				  TYPE = OBJECT;
176$if _x86
177				  SIZE = addrsize[86];
178$elif _sparc
179				  SIZE = addrsize[176];
180$else
181$error Unknown architecture
182$endif
183				};
184			};
185$else
186$error unknown ELFCLASS
187$endif
188    local:
189	*;
190};
191