1 .TH DYLD 1 "January 15, 2005" "Apple Computer, Inc."
3 dyld \- the dynamic link editor
7 DYLD_FALLBACK_FRAMEWORK_PATH
11 DYLD_FALLBACK_LIBRARY_PATH
17 DYLD_FORCE_FLAT_NAMESPACE
27 DYLD_PRINT_LIBRARIES_POST_LAUNCH
33 DYLD_NEW_LOCAL_SHARED_REGIONS
35 DYLD_IGNORE_PREBINDING
41 DYLD_PRINT_INITIALIZERS
49 The dynamic linker uses the following environment variables.
50 They affect any program that uses the dynamic linker.
52 .B DYLD_FRAMEWORK_PATH
53 This is a colon separated list of directories that contain frameworks.
54 The dynamic linker searches these directories before it searches for the
55 framework by its install name.
56 It allows you to test new versions of existing
57 frameworks. (A framework is a library install name that ends in the form
58 XXX.framework/Versions/YYY/XXX or XXX.framework/XXX, where XXX and YYY are any
61 For each framework that a program uses, the dynamic linker looks for the
62 framework in each directory in
63 .SM DYLD_FRAMEWORK_PATH
64 in turn. If it looks in all the directories and can't find the framework, it
65 searches the directories in
67 in turn. If it still can't find the framework, it then searches
68 .SM DYLD_FALLBACK_FRAMEWORK_PATH
70 .SM DYLD_FALLBACK_LIBRARY_PATH
77 to discover the frameworks and shared libraries that the executable
80 .B DYLD_FALLBACK_FRAMEWORK_PATH
81 This is a colon separated list of directories that contain frameworks.
82 It is used as the default location for frameworks not found in their install
85 By default, it is set to
86 /Library/Frameworks:/Network/Library/Frameworks:/System/Library/Frameworks
89 This is a colon separated list of directories that contain libraries. The
90 dynamic linker searches these directories before it searches the default
91 locations for libraries. It allows you to test new versions of existing
94 For each library that a program uses, the dynamic linker looks for it in each
97 in turn. If it still can't find the library, it then searches
98 .SM DYLD_FALLBACK_FRAMEWORK_PATH
100 .SM DYLD_FALLBACK_LIBRARY_PATH
107 to discover the frameworks and shared libraries that the executable
110 .B DYLD_FALLBACK_LIBRARY_PATH
111 This is a colon separated list of directories that contain libraries.
112 It is used as the default location for libraries not found in their install
114 By default, it is set
115 to $(HOME)/lib:/usr/local/lib:/lib:/usr/lib.
118 This is a colon separated list of directories. The dynamic linker will prepend each of
119 this directory paths to every image access until a file is found.
121 .B DYLD_INSERT_LIBRARIES
122 This is a colon separated list of dynamic libraries to load before the ones
123 specified in the program. This lets you test new modules of existing dynamic
124 shared libraries that are used in flat-namespace images by loading a temporary
125 dynamic shared library with just the new modules. Note that this has no
126 effect on images built a two-level namespace images using a dynamic shared
128 .SM DYLD_FORCE_FLAT_NAMESPACE
131 .B DYLD_FORCE_FLAT_NAMESPACE
132 Force all images in the program to be linked as flat-namespace images and ignore
133 any two-level namespace bindings. This may cause programs to fail to execute
134 with a multiply defined symbol error if two-level namespace images are used to
135 allow the images to have multiply defined symbols.
138 This is set to a string of a suffix to try to be used for all shared libraries
139 used by the program. For libraries ending in ".dylib" the suffix is applied
140 just before the ".dylib". For all other libraries the suffix is appended to the
141 library name. This is useful for using conventional "_profile" and "_debug"
142 libraries and frameworks.
145 When this is set, the dynamic linker writes to file descriptor 2 (normally
146 standard error) the command line options.
149 When this is set, the dynamic linker writes to file descriptor 2 (normally
150 standard error) the environment variables.
152 .B DYLD_PRINT_LIBRARIES
153 When this is set, the dynamic linker writes to file descriptor 2 (normally
154 standard error) the filenames of the libraries the program is using.
155 This is useful to make sure that the use of
156 .SM DYLD_LIBRARY_PATH
157 is getting what you want.
159 .B DYLD_PRINT_LIBRARIES_POST_LAUNCH
160 This does the same as
161 .SM DYLD_PRINT_LIBRARIES
162 but the printing starts after the program gets to its entry point.
164 .B DYLD_BIND_AT_LAUNCH
165 When this is set, the dynamic linker binds all undefined symbols
166 the program needs at launch time. This includes function symbols that can are normally lazily bound at the time of their first call.
168 .B DYLD_PREBIND_DEBUG
169 When this is set, the dynamic linker prints diagnostics about
170 launching prebound programs and libraries. This lets you determine why a
171 program is not being launched prebound.
172 You can view the recorded library time stamps with the
178 For secure programs that are UNIX set uid or set gid, the dynamic linker will
179 not use the dyld environment variables for path searching and library insertion,
180 unless the program is run as the real user. For secure programs, the dynamic
181 linker clears out the value of the dyld path and insertion environment
182 variables. This is so that if a program is
184 from a secure program too will not have it's libraries searched for, as well.
185 For statically linked secure programs that
187 other programs that might use the dynamic linker, they too should clear out the
188 values of the dyld path and insertion environment variables.
190 .B DYLD_NEW_LOCAL_SHARED_REGIONS
191 When set, the dynamic linker directs the system to provide a new set of shared
192 regions as the repository for library load requests for dynamic libraries
195 (split shared libraries).
197 Split shared libraries reside in a defined contiguous region of address space
198 in all dynamic linker runtime processes. This space is backed by named regions
199 or sub-maps. These sub-maps are owned by the system and items which are to
200 mapped into them must be mapped via the
201 .IR load_shared_file (2)
203 sub-maps promotes a high degree of system resource sharing between the
204 processes which incorporate and use them. However, some processes require
205 either additional or different libraries to be loaded into the shared region.
206 While there is some space available within the shared region for alternate and
207 new shared libraries, it is inappropriate to use that area for temporary or
208 private libraries. Setting the
209 .SM DYLD_NEW_LOCAL_SHARED_REGIONS
211 all children of the current process to have their own set of sub-maps. In this
212 way the libraries found in the children's submaps will not be caused to be
213 present in the submaps shared by the rest of the system.
215 .SM DYLD_NEW_LOCAL_SHARED_REGIONS
216 should be set by anyone wishing to run
217 non-standard or temporary split shared libraries by setting an explicit path to
218 point to them. i.e. by using the DYLD_LIBRARY_PATH environment variable
219 instead of changing the root by executing a
223 .B DYLD_PRINT_STATISTICS
224 Right before the process's main() is called, dyld prints out information about how
225 dyld spent its time. Useful for analyzing launch performance.
227 .B DYLD_IGNORE_PREBINDING { app | all }
228 Valid values are "app", "all", and "" (empty). The variable is useful for testing
229 how various mixes of prebound and unprebound libraries perform. When set to "all",
230 all prebinding is ignored. That is, dyld fixes up any prebound images as if the prebinding
231 in it was invalid. When set to "all", just the prebinding information in main
232 executables is ignored. When set the nothing, the prebinding in split-seg libraries
233 is used, by all other prebinding is ignored.
235 .B DYLD_PRINT_INITIALIZERS
236 Causes dyld to print out a line when running each initializers in every image. Initializers
237 run by dyld included constructors for C++ statically allocated objects, functions marked with
238 __attribute__((constructor)), and -init functions.
241 Causes dyld to print a line whenever a dyld API is called (e.g. NSAddImage()).
243 .B DYLD_PRINT_SEGMENTS
244 Causes dyld to print out a line containing the name and address range of each mach-o segment
247 .B DYLD_PRINT_BINDINGS
248 Causes dyld to print a line each time a symbolic name is bound.
253 libtool(1), ld(1), otool(1)