DYLD(1) DYLD(1)
NAME
dyld - the dynamic link editor
SYNOPSIS
DYLDFRAMEWORKPATH
DYLDFALBACKFRAMEWORKPATH
DYLDLIBRARYPATH
DYLDFALBACKLIBRARYPATH
DYLDROTPATH
DYLDINSERTLIBRARIES
DYLDFORCEFLATNAMESPACE
DYLDIMAGESUFIX
DYLDPRINTOPTS
DYLDPRINTENV
DYLDPRINTLIBRARIES
DYLDPRINTLIBRARIESPOSTLAUNCH
DYLDBINDATLAUNCH
DYLDPREBINDEBUG
DYLDNEWLOCALSHAREDREGIONS
DYLDIGNOREPREBINDING
DYLDPRINTAPIS
DYLDPRINTBINDINGS
DYLDPRINTINITIALIZERS
DYLDPRINTREBASINGS
DYLDPRINTSEGMENTS
DYLDPRINTSTATISTICS
DESCRIPTION
The dynamic linker uses the following environment variables. They
affect any program that uses the dynamic linker.
DYLDFRAMEWORKPATH
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
X.framework/Versions/Y/X or X.framework/X, where X
and Y 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
DYLDFALBACKFRAMEWORKPATH and DYLDFALBACKLIBRARYPATH in
turn.
Use the -L option to otool(1). to discover the frameworks and
shared libraries that the executable is linked against.
DYLDFALBACKFRAMEWORKPATH
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
DYLDLIBRARYPATH
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 it
still can't find the library, it then searches DYLDFAL-
BACKFRAMEWORKPATH and DYLDFALBACKLIBRARYPATH in turn.
Use the -L option to otool(1). to discover the frameworks and
shared libraries that the executable is linked against.
DYLDFALBACKLIBRARYPATH
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.
DYLDROTPATH
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.
DYLDINSERTLIBRARIES
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 used
in flat-namespace images by loading a temporary dynamic shared
library with just the new modules. Note that this has no effect
on 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 symbol
error if two-level namespace images are used to allow the images
to have multiply defined symbols.
DYLDIMAGESUFIX
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.
DYLDPRINTOPTS
When this is set, the dynamic linker writes to file descriptor 2
(normally standard error) the command line options.
DYLDPRINTENV
When this is set, the dynamic linker writes to file descriptor 2
(normally standard error) the environment variables.
DYLDPRINTLIBRARIES
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.
DYLDPRINTLIBRARIESPOSTLAUNCH
This does the same as DYLDPRINTLIBRARIES but the printing
starts after the program gets to its entry point.
DYLDBINDATLAUNCH
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.
DYLDPREBINDEBUG
When this is set, the dynamic linker prints diagnostics about
launching prebound programs and libraries. This lets you deter-
mine why a program is not being launched prebound. You can view
the recorded library time stamps with the -Lv option to
otool(1).
For secure programs that are UNIX set uid or set gid, the
dynamic linker will
not use the dyld environment variables for path searching and
library insertion, unless the program is run as the real user.
For secure programs, the dynamic linker clears out the value of
the dyld path and insertion environment variables. This is so
that if a program is exec(2)'ed from a secure program too will
not have it's libraries searched for, as well. For statically
linked secure programs that exec(2) other programs that might
use the dynamic linker, they too should clear out the values of
the dyld path and insertion environment variables.
DYLDNEWLOCALSHAREDREGIONS
When set, the dynamic linker directs the system to provide a new
set of shared regions as the repository for library load
requests for dynamic libraries built with MHSPLITSEGS (split
shared libraries).
Split shared libraries reside in a defined contiguous region of
address space in all dynamic linker runtime processes. This
space is backed by named regions or sub-maps. These sub-maps
are owned by the system and items which are to mapped into them
must be mapped via the loadsharedfile(2) call. The use of
sub-maps promotes a high degree of system resource sharing
between the processes which incorporate and use them. However,
some processes require either additional or different libraries
to be loaded into the shared region. While there is some space
available within the shared region for alternate and new shared
libraries, it is inappropriate to use that area for temporary or
private libraries. Setting the DYLDNEWLOCALSHAREDREGIONS
flag will cause all children of the current process to have
their own set of sub-maps. In this way the libraries found in
the children's submaps will not be caused to be present in the
submaps shared by the rest of the system.
DYLDNEWLOCALSHAREDREGIONS should be set by anyone wishing to
run non-standard or temporary split shared libraries by setting
an explicit path to point to them. i.e. by using the
DYLDLIBRARYPATH environment variable instead of changing the
root by executing a chroot(2) call.
DYLDPRINTSTATISTICS
Right before the process's main() is called, dyld prints out
information about how dyld spent its time. Useful for analyzing
launch performance.
DYLDIGNOREPREBINDING {{ app all }}
Valid values are "app", "all", and "" (empty). The variable is
useful for testing how various mixes of prebound and unprebound
libraries perform. When set to "all", all prebinding is
ignored. That is, dyld fixes up any prebound images as if the
prebinding in it was invalid. When set to "all", just the pre-
binding information in main executables is ignored. When set the
nothing, the prebinding in split-seg libraries is used, by all
other prebinding is ignored.
DYLDPRINTINITIALIZERS
Causes 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 with
attribute((constructor)), and -init functions.
DYLDPRINTAPIS
Causes dyld to print a line whenever a dyld API is called (e.g.
NSAddImage()).
DYLDPRINTSEGMENTS
Causes dyld to print out a line containing the name and address
range of each mach-o segment that dyld maps in.
DYLDPRINTBINDINGS
Causes dyld to print a line each time a symbolic name is bound.
SEE ALSO
libtool(1), ld(1), otool(1)
Apple Computer, Inc. January 15, 2005 DYLD(1)
|