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 83 SIZE = 44; 84 $elif _x86 && _ELF64 85 86 SIZE = 80; 87 $elif _sparc && _ELF32 88 89 SIZE = 44; 90 $elif _sparc && _ELF64 91 92 SIZE = 80; 93 $else 94 95 $error Unknown platform 96 97 $endif 98 99 }; 100 }; 101 102 elf_plt_write; 103 is_so_loaded; 104 lml_main { 105 ASSERT = { 106 TYPE = OBJECT; 107 $if _ELF32 108 109 SIZE = addrsize[41]; 110 $elif _ELF64 111 112 SIZE = addrsize[38]; 113 $else 114 115 $error Unknown platform 116 117 $endif 118 119 }; 120 }; 121 lookup_sym; 122 123 alist_append; # librtld support 124 ld_entry_cnt { ASSERT = { TYPE = OBJECT; SIZE = addrsize; }; }; 125 # Diagnostic support 126 dbg_desc { ASSERT = { TYPE = OBJECT; SIZE = addrsize; }; }; 127 dbg_print; 128 eprintf; # Error message printing 129 veprintf; 130 131 dgettext; # Messaging support 132 strerror; 133 134 calloc; # Memory management (mapmalloc). 135 free; 136 malloc; 137 realloc; 138 139 # PLT tracing getenv() support. 140 _environ { ASSERT = { TYPE = OBJECT; SIZE = addrsize; }; }; 141 environ { 142 ASSERT = { 143 BINDING = WEAK; 144 ALIAS = _environ; 145 }; 146 }; 147 148 memcpy; # Some routines are useful for support 149 snprintf; # libraries such as liblddbg. 150 sprintf; # Note that some of these functions 151 strcat; # (like sprintf) may have reduced 152 strcmp; # functionality over libc, as a simpler 153 strcpy; # implementation is provided in ld.so.1. 154 strlen; 155 strrchr; 156 strtok_r; 157 ___errno; 158 qsort; 159 dl_iterate_phdr; 160 161$if _x86 && _ELF64 162 # amd64 ABI exception unwinding 163 _dlamd64getunwind; 164 dlamd64getunwind; 165$endif 166 167 # doXX_reloc_rtld and relocXX_table are required to 168 # support librtld.so. 169$if _ELF32 170 do32_reloc_rtld; 171 reloc32_table { 172 ASSERT = { 173 TYPE = OBJECT; 174 $if _x86 175 SIZE = addrsize[117]; 176 $elif _sparc 177 SIZE = addrsize[264]; 178 $else 179 $error Unknown architecture 180 $endif 181 }; 182 }; 183$elif _ELF64 184 do64_reloc_rtld; 185 reloc64_table { 186 ASSERT = { 187 TYPE = OBJECT; 188 $if _x86 189 SIZE = addrsize[68]; 190 $elif _sparc 191 SIZE = addrsize[176]; 192 $else 193 $error Unknown architecture 194 $endif 195 }; 196 }; 197$else 198$error unknown ELFCLASS 199$endif 200 local: 201 *; 202}; 203