diff options
author | ceri <ceri@FreeBSD.org> | 2005-12-23 15:31:37 +0000 |
---|---|---|
committer | ceri <ceri@FreeBSD.org> | 2005-12-23 15:31:37 +0000 |
commit | 9618c3e8c0414039db3cfbca298913be491ada3b (patch) | |
tree | 616ac6df076eefa2e93117a8b04ee6ea4573b858 /usr.sbin/crunch/crunchgen/crunchgen.1 | |
parent | bb7dfbb0a8ac5602f6874897af25e7aee24aed7f (diff) | |
download | FreeBSD-src-9618c3e8c0414039db3cfbca298913be491ada3b.zip FreeBSD-src-9618c3e8c0414039db3cfbca298913be491ada3b.tar.gz |
Commands like gmirror, graid3, ... and others which use dlopen() to load
classes from say, /lib/geom, cannot be statically linked completely.
Moreover, those shared objects may require other shared objects (i.e.
for geom, libraries like -lmd, -lcrypto).
The libs_so extension to crunchgen fixes this by allowing some libraries
to be linked in dynamically. This requires that a copy of rtld and the
shared libraries be made available to the crunched binary, and so is not
suitable for all environments. Crunchgen configurations which do not
use the 'libs_so' keyword are unaffected and produce identical binaries
with and without this commit.
Approved by: murray (mentor, in spirit), jhb
In collaboration with: Adrian Steinmann <ast at marabu dot ch>
MFC After: 6 weeks
Diffstat (limited to 'usr.sbin/crunch/crunchgen/crunchgen.1')
-rw-r--r-- | usr.sbin/crunch/crunchgen/crunchgen.1 | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/usr.sbin/crunch/crunchgen/crunchgen.1 b/usr.sbin/crunch/crunchgen/crunchgen.1 index 4333866..3c8d213 100644 --- a/usr.sbin/crunch/crunchgen/crunchgen.1 +++ b/usr.sbin/crunch/crunchgen/crunchgen.1 @@ -139,7 +139,7 @@ generated by .Nm . This is useful to define some make variables such as .Va RELEASE_CRUNCH -or similar, which might affect the behaviour of +or similar, which might affect the behavior of .Xr make 1 and are annoying to pass through environment variables. .It Fl m Ar makefile-name @@ -210,6 +210,21 @@ A list of library specifications to be included in the crunched binary link. Multiple .Ic libs lines can be specified. +.It Ic libs_so Ar libspec ... +A list of library specifications to be dynamically linked in the +crunched binary. +These libraries will need to be made available via the run-time link-editor +.Xr rtld 1 +when the component program that requires them is executed from +the crunched binary. +Multiple +.Ic libs_so +lines can be specified. +The +.Ic libs_so +directive overrides a library specified gratuitously on a +.Ic libs +line. .It Ic buildopts Ar buildopts ... A list of build options to be added to every make target. .It Ic ln Ar progname linkname @@ -417,9 +432,15 @@ At this point the binary .Dq Pa kcopy can be copied onto an install floppy and hard-linked to the names of the component programs. +.Pp +Note that if the +.Ic libs_so +command had been used, copies of the libraries so named +would also need to be copied to the install floppy. .Sh SEE ALSO .Xr crunchide 1 , -.Xr make 1 +.Xr make 1 , +.Xr rtld 1 .Sh CAVEATS While .Nm @@ -446,3 +467,10 @@ utility was written by .Pp Copyright (c) 1994 University of Maryland. All Rights Reserved. +.Pp +The +.Ic libs_so +keyword was added in 2005 by +.An Adrian Steinmann Aq ast@marabu.ch +and +.An Ceri Davies Aq ceri@FreeBSD.org . |