NAME
dyld - the dynamic link editor
SYNOPSIS
DYLDFRAMEWORKPATH DYLDFALLBACKFRAMEWORKPATH DYLDLIBRARYPATH DYLDFALLBACKLIBRARYPATH DYLDROOTPATH DYLDSHAREDREGION DYLDINSERTLIBRARIESDYLDFORCEFLATNAMESPACE
DYLDIMAGESUFFIX DYLDPRINTOPTS DYLDPRINTENV DYLDPRINTLIBRARIES DYLDPRINTLIBRARIESPOSTLAUNCH DYLDBINDATLAUNCH DYLDNOFIXPREBINDING DYLDDISABLEDOFS DYLDPRINTAPIS DYLDPRINTBINDINGS DYLDPRINTINITIALIZERS DYLDPRINTREBASINGS DYLDPRINTSEGMENTS DYLDPRINTSTATISTICS DYLDPRINTDOFSDESCRIPTION
The dynamic linker uses the following environment variables. They affect any program that uses the dynamic linker. DDYYLLDDFFRRAAMMEEWWOORRKKPPAATTHH This is a colon separated list of directories that contain frameworks. The dynamic linker searches these directories before it searches for the framework by its install name. It allows you to test new versions of existing frameworks. (A framework is a library install name that ends in the form XXX.framework/Versions/YYY/XXX or XXX.framework/XXX, where XXX and YYY are any name.) For each framework that a program uses, the dynamic linker looks for the framework in each directory in DYLDFRAMEWORKPATH in turn. If it looks in all the directories and can't find the framework, it searches the directories in DYLDLIBRARYPATH in turn. If it still can't find the framework, it then searches DYLDFALLBACKFRAMEWORKPATH and DYLDFALLBACKLIBRARYPATH in turn.Use the -LL option to otool(1). to discover the frameworks and
shared libraries that the executable is linked against. DDYYLLDDFFAALLLLBBAACCKKFFRRAAMMEEWWOORRKKPPAATTHH This is a colon separated list of directories that contain frameworks. It is used as the default location for frameworks not found in their install path.By default, it is set to /Library/Frameworks:/Net-
work/Library/Frameworks:/System/Library/Frameworks DDYYLLDDLLIIBBRRAARRYYPPAATTHH This is a colon separated list of directories that contain libraries. The dynamic linker searches these directories before it searches the default locations for libraries. It allows you to test new versions of existing libraries. For each library that a program uses, the dynamic linker looks for it in each directory in DYLDLIBRARYPATH in turn. If itstill can't find the library, it then searches DYLDFALL-
BACKFRAMEWORKPATH and DYLDFALLBACKLIBRARYPATH in turn.Use the -LL option to otool(1). to discover the frameworks and
shared libraries that the executable is linked against. DDYYLLDDFFAALLLLBBAACCKKLLIIBBRRAARRYYPPAATTHH This is a colon separated list of directories that contain libraries. It is used as the default location for libraries not found in their install path. By default, it is set to$(HOME)/lib:/usr/local/lib:/lib:/usr/lib.
DDYYLLDDRROOOOTTPPAATTHH This is a colon separated list of directories. The dynamic linker will prepend each of this directory paths to every image access until a file is found. DDYYLLDDSSHHAARREEDDRREEGGIIOONNThis can be "use" (the default), "avoid", or "private". Sett-
ting it to "avoid" tells dyld to not use the shared cache. All
OS dylibs are loaded dynamically just like every other dylib.Setting it to "private" tells dyld to remove the shared region
from the process address space and mmap() back in a private copyof the dyld shared cache in the shared region address range.
This is only useful if the shared cache on disk has been updated and is different than the shared cache in use. DDYYLLDDIINNSSEERRTTLLIIBBRRAARRIIEESS This is a colon separated list of dynamic libraries to load before the ones specified in the program. This lets you test new modules of existing dynamic shared libraries that are usedin flat-namespace images by loading a temporary dynamic shared
library with just the new modules. Note that this has no effecton images built a two-level namespace images using a dynamic
shared library unless DYLDFORCEFLATNAMESPACE is also used.
DYLDFORCEFLATNAMESPACE
Force all images in the program to be linked as flat-namespace
images and ignore any two-level namespace bindings. This may
cause programs to fail to execute with a multiply defined symbolerror if two-level namespace images are used to allow the images
to have multiply defined symbols. DDYYLLDDIIMMAAGGEESSUUFFFFIIXX This is set to a string of a suffix to try to be used for all shared libraries used by the program. For libraries ending in ".dylib" the suffix is applied just before the ".dylib". For all other libraries the suffix is appended to the library name. This is useful for using conventional "profile" and "debug" libraries and frameworks. DDYYLLDDPPRRIINNTTOOPPTTSS When this is set, the dynamic linker writes to file descriptor 2 (normally standard error) the command line options. DDYYLLDDPPRRIINNTTEENNVV When this is set, the dynamic linker writes to file descriptor 2 (normally standard error) the environment variables. DDYYLLDDPPRRIINNTTLLIIBBRRAARRIIEESS When this is set, the dynamic linker writes to file descriptor 2 (normally standard error) the filenames of the libraries the program is using. This is useful to make sure that the use of DYLDLIBRARYPATH is getting what you want. DDYYLLDDPPRRIINNTTLLIIBBRRAARRIIEESSPPOOSSTTLLAAUUNNCCHH This does the same as DYLDPRINTLIBRARIES but the printing starts after the program gets to its entry point. DDYYLLDDBBIINNDDAATTLLAAUUNNCCHH When this is set, the dynamic linker binds all undefined symbols the program needs at launch time. This includes function symbols that can are normally lazily bound at the time of their first call. DDYYLLDDPPRRIINNTTSSTTAATTIISSTTIICCSSRight before the process's main() is called, dyld prints out
information about how dyld spent its time. Useful for analyzing
launch performance. DDYYLLDDNNOOFFIIXXPPRREEBBIINNDDIINNGGNormally, dyld will trigger the dyld shared cache to be regener-
ated if it notices the cache is out of date while launching aprocess. If this environment variable is set, dyld will not
trigger a cache rebuild. This is useful to set while installing a large set of OS dylibs, to ensure the cache is not regenerated until the install is complete. DDYYLLDDDDIISSAABBLLEEDDOOFFSSCauses dyld not register dtrace static probes with the kernel.
DDYYLLDDPPRRIINNTTIINNIITTIIAALLIIZZEERRSSCauses dyld to print out a line when running each initializers
in every image. Initializers run by dyld included constructors
for C++ statically allocated objects, functions marked withattribute((constructor)), and -init functions.
DDYYLLDDPPRRIINNTTAAPPIISSCauses dyld to print a line whenever a dyld API is called (e.g.
NSAddImage()). DDYYLLDDPPRRIINNTTSSEEGGMMEENNTTSSCauses dyld to print out a line containing the name and address
range of each mach-o segment that dyld maps. In addition it
prints information about if the image was from the dyld shared
cache. DDYYLLDDPPRRIINNTTBBIINNDDIINNGGSSCauses dyld to print a line each time a symbolic name is bound.
DDYYLLDDPPRRIINNTTDDOOFFSSCauses dyld to print out information about dtrace static probes
registered with the kernel.SEE ALSO
libtool(1), ld(1), otool(1) Apple Inc. March 23, 2007 DYLD(1)