cmpshlib.1   [plain text]

.TH CMPSHLIB 1 "April 2, 1995 (Release 4.0)" "NeXT Computer, Inc."
cmpshlib \- compare two shared libraries for compatibility
.B cmpshlib
.B "[ \-s"
.I spec_file 
.B ]
.B " [ \-arch 
.I arch_type 
.B ]
.I old 
.I new
.I cmpshlib
compares two versions of a target shared library to see if the changes introduced by the newer target
shared library,
.I new,
are compatible with the older target shared library,
.I old.
This command makes the following checks: It verifies that the all of the old branch table targets have the same symbol in the new branch table and that all the old global data symbols have the same addresses.
With the
.B \-s 
.I spec_file
global const data symbols (
.B #nobranch_text 
and not 
.B #private_externs
) are checked
for the same addresses while 
.B #private_externs 
data symbols with different addresses are not reported. Also with the 
.B \-s 
.I spec_file
option, branch table slots that have
names that change from the old version but remain compatible will not get errors if the optional branch table slot specifies
.BI old_name " old_funcname"
.I old_funcname
is the name of the symbol in the old version.  If this information is supplied,
.IR cmpshlib
first checks for branch slot matching in the usual way and, if that fails,
it checks for 
.I old_funcname
matching to see if the branch table slot is compatible.
For ``fat'' target shared libraries, the
.BI \-arch " arch_type"
option specifies the architecture of the shared library to be checked.  If the file
.I old
is a ``fat'' file that contains more than one architecture you must use this option.
Only one 
.BI \-arch " arch_type"
can be specified and only one architecture is checked.  See
.IR arch (3)
for the currently know
.IR arch_type s.
Many other things, particularly in the host libraries,
could be checked but are not.  This command only catches most of the major problems.
Also, any slot that was part of a range used for a symbol that was replaced by
a new symbol is printed as a warning (this is not the case if .empty_slot
is used).