rebase.1   [plain text]


.Dd June 6, 2006
.Dt rebase 1
.Os Darwin
.Sh NAME
.Nm rebase
.Nd "Changes base address of dylibs and bundles"
.Sh SYNOPSIS
.Nm
.Op Fl low_address Ar addr 
.Op Fl high_address Ar addr 
.Op Fl arch Ar arch 
.Op Fl v
.Ar file(s)
.Sh DESCRIPTION
The base address of an image (dylib or bundle) is the preferred address for it to be loaded.  By
default all images are built with a base address of zero.  At runtime, if the
preferred memory range is already occupied, dyld will "slide" the image to a new address range.
There is a small cost to the slide, as dyld must do some fix ups.
The rebase tool takes a list of images and adjust their base address to be non-overlapping. If no
low or high address is specified, the a suitable address range is choosen for the architecture.
.Pp
The options are as follows:
.Bl -tag -width indent
.It Fl low_address Ar addr
Force the base address for the first image to be 
.Ar addr
(specified in hex). Each subsequent file gets the next available base address.
.It Fl high_address Ar addr
Force the base address for the last image to be such that when that image is loaded it occupies 
memory up to
.Ar addr
(specified in hex). Each preceeding file gets the previous available base address.
.It Fl arch Ar arch
Only rebase the specified architecture.  Other architectures in a universal image are left as is.
.It Fl v
Verbose. Print information about rebasing done.
.El
.Sh SEE ALSO
.Xr ld 1