dyld-750.6.tar.gz
[apple/dyld.git] / doc / man / man1 / update_dyld_shared_cache.1
1 .Dd June 1, 2017
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 overlay Ar directory 
11 .Op Fl arch Ar arch 
12 .Op Fl force 
13 .Op Fl debug
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.  This tool is normally
18 only run by Apple's Installer and Software Update, as they are the only
19 official ways for OS dylibs to be updated.  But if for some reason you
20 used another mechanism to alter an OS dylib, you should manually run
21 .Nm update_dyld_shared_cache . 
22 .Pp
23 Note that the new cache does not take effect until the OS is rebooted.  
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 /System/Library/Receipts/ for .bom files which list all files
34 installed.  From that info it creates the set of OS dylibs to build into the dyld cache.
35 .Pp
36 .Nm update_dyld_shared_cache
37 builds a separate cache file for each architecture.  The cache files and a readable text
38 map of the cached are generated to /var/db/dyld.
39 .Pp
40 You must be root to run this tool.
41 .Pp
42 The options are as follows:
43 .Bl -tag
44 .It Fl root Ar directory
45 This option specifies the root of an OS installation for which dyld's
46 shared cache should be updated.  This is used by the Installer to update the
47 dyld shared cache in a partition other than the one you into which you are currently 
48 booted.  The cache files are created in the var/db/dyld directory of the specified directory.
49 Note: if you are manually doing this, be sure to run the update_dyld_shared_cache tool
50 that is in the partition being updated.  This assures the cache format created will
51 match that expected when booting off that partition. 
52 .It Fl overlay Ar directory
53 This option specifies the root of a sparse directory tree.  When building
54 the dyld shared cache, any corresponding mach-o files in the sparse directory 
55 will override those in the boot partition.  This is used by Software
56 Update to build a dyld shared cache for the update that is about to be
57 installed.  The cache files
58 are created in the var/db/dyld directory of the specified directory.
59 .It Fl arch Ar arch
60 By default 
61 .Nm update_dyld_shared_cache 
62 generates cache files for all architecture that the current machine
63 can execute.  You can override this behavior by specifying one or more -arch options and list
64 exactly which architectures should have their shared caches updated.
65 .It Fl force
66 This option will cause 
67 .Nm update_dyld_shared_cache
68 to regenerated the shared cache files even if they appear to be already up-to-date. 
69 .It Fl debug
70 This option prints out additional information about the work being done.
71 .It Fl universal_boot
72 This option builds caches for all machines.
73 .El
74 .Sh SEE ALSO
75 .Xr dyld 1