]> git.saurik.com Git - apple/dyld.git/blob - doc/man/man1/update_dyld_shared_cache.1
dyld-96.2.tar.gz
[apple/dyld.git] / doc / man / man1 / update_dyld_shared_cache.1
1 .Dd March 23, 2007
2 .Dt update_dyld_shared_cache 1
3 .Os Darwin
4 .Sh NAME
5 .Nm update_dyld_shared_cache
6 .Nd "Updates dyld's shared cache"
7 .Sh SYNOPSIS
8 .Nm
9 .Op Fl root Ar directory
10 .Op Fl arch Ar arch
11 .Op Fl force
12 .Op Fl debug
13 .Op Fl sort_by_name
14 .Op Fl universal_boot
15 .Sh DESCRIPTION
16 .Nm update_dyld_shared_cache
17 ensures that dyld's shared cache is up-to-date. Normally, this command
18 never needs to be manually run. Instead, it is automatically run by launchd
19 when dyld notices the shared cache is out of date. To prevent the cache
20 from being regeneated during an install or during development of OS dylibs,
21 dyld will not trigger a shared cache rebuild if the environment variable
22 DYLD_NO_FIX_PREBINDING is set, or if the main executable is a setuid binary,
23 or alternate dylibs are loaded via one of the DYLD_ environment variables.
24 .Pp
25 The dyld shared cache
26 is mapped by dyld into a process at launch time. Later, when loading
27 any mach-o image, dyld will first check if is in the share cache, and if
28 it is will use that pre-bound version instead of opening, mapping, and binding
29 the original file. This results in significant performance improvements to
30 launch time.
31 .Pp
32 .Nm update_dyld_shared_cache
33 scans the directory /var/db/dyld/shared_region_roots for text files containing paths to
34 mach-o executables. The full dependencies of all dylibs required by those executables is
35 used to determine which libraries are commonly used and should be placed in the
36 shared cache. If one of the text files contains a path to a dylib, that dylib and its
37 depenents will be forced into the cache.
38 .Pp
39 .Nm update_dyld_shared_cache
40 builds a separate cache file for each architecture. The cache files and a readable text
41 map of the cached are generated to /var/db/dyld.
42 .Pp
43 You must be root to run this tool.
44 .Pp
45 The options are as follows:
46 .Bl -tag
47 .It Fl root Ar directory
48 This option specifies the root of an OS installation for which dyld's
49 shared cache should be updated. This allosw you to update the
50 shared cache on a non-running version of the OS. The cache files
51 are created in the var/db/dyld directory of the specified directory.
52 .It Fl arch Ar arch
53 By default
54 .Nm update_dyld_shared_cache
55 generates cache files for all architecture that the current machine
56 can execute. You can override this behavior by specifying one or more -arch options and list
57 exactly which architectures should have their shared caches updated.
58 .It Fl force
59 This option will cause
60 .Nm update_dyld_shared_cache
61 to regenerated the shared cache files even if they appear to be already up-to-date.
62 .It Fl debug
63 This option prints out additional information about the work being done.
64 .It Fl sort_by_name
65 By default
66 .Nm update_dyld_shared_cache
67 assignes a random start address to each mach-o image in the cache.
68 This option causes the start addresses to be choosen in path order, thus subsequent runs will
69 produce the same address layout which can help reproduce some bugs.
70 .It Fl universal_boot
71 This option can only be used running on an machine with an Intel processor. It builds caches
72 that can be used when booting on an Intel or a PowerPC based machine.
73 .El
74 .Sh FILES
75 .Tp
76 /var/db/dyld/shared_region_roots
77 directory of text files with paths to mach-o images used to determine what should be in shared cache.
78 .Sh SEE ALSO
79 .Xr dyld 1