opnsense-src/tools/tools/shlib-compat
Craig Rodrigues 749f65e3e3 Use print as a function for Python 3 [PEP 3105]
Import print_function from the __future__ module
to activate this for Python 2.  This works as far back as Python 2.6.0a2:
   https://docs.python.org/2/library/__future__.html

[PEP 3105] https://www.python.org/dev/peps/pep-3105/
2015-11-19 00:01:52 +00:00
..
test
Makefile.sysfake
makesyscalls-fake.sh
README
shlib-compat-dirs.sh
shlib-compat.py Use print as a function for Python 3 [PEP 3105] 2015-11-19 00:01:52 +00:00

ABI compatibility checker for shared libraries with symbol versioning.

shlib-compat uses dwarf debugging symbols to recreate definitions of
exported symbols, including function arguments and structural types.

The shlib-compat.py script requires devel/dwarfdump port to be
installed.


Syscalls in libc are implemented as assembly stubs and thus have no
debugging symbols attached. To enable sysfake stubs rebuild libc
adding the following to /etc/make.conf:

.if ${.CURDIR:M/usr/src/lib/libc}
.include "../../tools/tools/shlib-compat/Makefile.sysfake"
.endif

To compare libc.so versions compiled with sysfake stubs:
./shlib-compat.py -v --alias-prefix __sysfake_ \
	--alias-prefix __sysfake_freebsd8_ \
	--exclude-ver FBSDprivate \
	--out-orig out-orig.c --out-new out-new.c libc.so.7.orig libc.so.7.new