'\" t .\" Title: relaytool .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 14 May,2012 .\" Manual: Listaller Project .\" Source: Listaller Project .\" Language: English .\" .TH "RELAYTOOL" "1" "14 May,2012" "Listaller Project" "Listaller Project" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" relaytool \- Generate a file that can be used instead of linking directly against a library .SH "SYNOPSIS" .HP \w'\fBrelaytool\fR\ 'u \fBrelaytool\fR [\fBOPTION \&.\&.\&.\fR] [\fBLINKER COMMAND \&.\&.\&.\fR] .SH "DESCRIPTION" .PP This manual page documents briefly the \fBrelaytool\fR command\&. .PP \fBrelaytool\fR is a program to provide a more convenient interface to dlopen/dlsym\&. It lets you write the same style of code you would when using a normal hard link (\-lwhatever), but the symbols are actually lazy\-linked at runtime\&. You can use the symbols libwhatever_is_present and libwhatever_symbol_is_present() to find out what APIs are actually available at runtime\&. .PP In other words, the need to use function pointers and lots of manual calls to dlsym() is eliminated, and it becomes much simpler to soft link to things as a result\&. If a symbol is missing at runtime and you call it anyway, your application will abort and an error message is printed that states which function was called\&. If a variable is missing at runtime, the value is always \-1\&. .SH "OPTIONS" .PP \fB\-\-relay \fR\fB\fILIB\fR\fR .RS 4 If a matching \-lLIB is found, generate a file that can be used instead of linking directly to LIB\&. The name of the file is echoed on stdout\&. Multiple \-\-relay can be used together, a file will be generated for each matching ones\&. .RE .PP \fB\-\-replace\-all\-libs\fR .RS 4 Generate a file for every \-lLIB parameter\&. .RE .PP \fB\-\-minimal\-list \fR\fB\fIOBJ_LIST\fR\fR .RS 4 Will look in OBJ_LIST for undefined symbols, and generate a file creating only the needed symbols for each LIB\&. .RE .PP \fB\-\-partial\-map \fR\fB\fIMAP_FILE\fR\fR .RS 4 Generate a file creating only the symbols contained in MAP_FILE\&. Will apply to all further \-lLIB parameters, so in general is not suitable to multiple libs in the same invocation of relaytool\&. .RE .PP \fB\-\-no\-replace\fR .RS 4 Echo \-lLIB on stdout even if a \-\-relay LIB is found, so it\*(Aqll be linked in normally\&. .RE .PP \fB\-\-multilink \fR\fB\fI[SONAMES\&.\&.\&.]\fR\fR .RS 4 If a library has different SONAMES on different Linux distributions you can specify the various SONAMES that it\*(Aqs known by here\&. Relaytool will attempt to load them (in the order provided) until one if found\&. This cannot be used with multiple \-\-relay options\&. The first SONAME in the list will be used as the name in the _is_present variable and _symbol_is_present function\&. .RE .PP \fB\-\-out\-dir \fR\fB\fIDIRECTORY\fR\fR .RS 4 Write stub file to DIRECTORY instead of CWD\&. .RE .SH "LINKER COMMANDS" .PP \fB\-LPATH\fR .RS 4 Add PATH to the list of paths to search for LIBs\&. .RE .PP \fB\-lLIB\fR .RS 4 If a matching \-\-relay LIB is found (or if \-\-replace\-all\-libs is specified), generate a file that can be used instead of linking directly to LIB\&. If there\*(Aqs no \-\-relay LIB, echo \-lLIB to stdout\&. .RE .PP All other linker commands are passed as is to stdout\&. .SH "OTHER COMMANDS" .PP \fB\-h\fR, \fB\-\-help\fR .RS 4 Show some help\&. .RE .PP \fB\-\-version\fR .RS 4 Display version information of relaytool .RE .SH "SEE ALSO" .PP lipkgen (1), ligcc(1), gcc(1)\&. .PP Additional documentation can be found on http://listaller\&.tenstral\&.net/wiki/doku\&.php/relaytool\&. .SH "AUTHOR" .PP This manual page was written by Matthias Klumpp \&. .SH "COPYRIGHT" .br Copyright \(co 2009-2012 Matthias Klumpp .br