INSTALL_NAME_TOOL(1) General Commands Manual INSTALL_NAME_TOOL(1)NAME
install_name_tool - change dynamic shared library install names
install_name_tool [-change old new ] ... [-rpath old new ] ... [-add_rpath new ] ... [-delete_rpath new ] ... [-id name] file
Install_name_tool changes the dynamic shared library install names and or adds, changes or deletes the rpaths recorded in a Mach-O binary.
For this tool to work when the install names or rpaths are larger the binary should be built with the ld(1)-headerpad_max_install_names
-change old new
Changes the dependent shared library install name old to new in the specified Mach-O binary. More than one of these options can be
specified. If the Mach-O binary does not contain the old install name in a specified -change option the option is ignored.
Changes the shared library identification name of a dynamic shared library to name. If the Mach-O binary is not a dynamic shared
library and the -id option is specified it is ignored.
-rpath old new
Changes the rpath path name old to new in the specified Mach-O binary. More than one of these options can be specified. If the
Mach-O binary does not contain the old rpath path name in a specified -rpath it is an error.
Adds the rpath path name new in the specified Mach-O binary. More than one of these options can be specified. If the Mach-O binary
already contains the new rpath path name specified in -add_rpath it is an error.
deletes the rpath path name old in the specified Mach-O binary. More than one of these options can be specified. If the Mach-O
binary does not contains the old rpath path name specified in -delete_rpath it is an error.
SEE ALSO ld(1)Apple, Inc. March 4, 2009 INSTALL_NAME_TOOL(1)
Check Out this Related Man Page
MACH-O(5) File Formats Manual MACH-O(5)NAME
Mach-O - Mach-O assembler and link editor output
The object files produced by the assembler and link editor are in Mach-O (Mach object) file format. The file name a.out is the default
output file name of the assembler as(1) and the link editor ld(1) The format of the object file however is not 4.3BSD a.out format as the
name suggests, but rather Mach-O format. The link editor will make a.out executable if the resulting format is an executable type and
there were no errors and no unresolved external references.
The complete description of a Mach-O file is given in a number of include files. The file <mach-o/loader.h> describes the headers, <mach-
o/nlist.h> describes the symbol table entries with <mach-o/stab.h> supplementing it, and <mach-o/reloc.h> describes the relocation entries.
The actual instructions and data used by the program represented by a Mach-O file are the contents of its sections. Sections are grouped
together in segments. Each section carries with it, in its header, the information as to which segment it belongs in. When a file type
that is executable is created the sections are placed in their proper segment and all the segment headers are created and the segments
themselves are padded out to the segment alignment (typically the target pagesize). For the object file type produced by an assembler (or
by the link editor for further linking) all the sections are placed in one segment for compactness.
When the kernel executes a Mach-O file it maps in the object file's segments, the dynamic link editor (if used) and creates the thread(s)
for execution. Any part of the object file that is not part of a segment is not mapped in for execution. For executable using the dynamic
link editor the headers and other link edit information is needed to execute the file. These parts include the relocation entries, the
symbol table and the string table. These parts are mapped in with the use of the link editor's -seglinkedit option which creates a segment
that contains these parts. These parts can be stripped down with the -S option to ld(1) or various options to strip(1).
SEE ALSO as(1), ld(1), nm(1), gdb(1), stab(5), strip(1)Apple Computer, Inc. October 22, 2001 MACH-O(5)