1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Listaller Reference Manual: relaytool</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Listaller Reference Manual">
<link rel="up" href="manpages.html" title="Listaller Tools Manual Pages">
<link rel="prev" href="re23.html" title="lipkgen">
<link rel="next" href="re25.html" title="runapp">
<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="manpages.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="re23.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="re25.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="id-1.4.9"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle">relaytool</span></h2>
<p>relaytool — Generate a file that can be used instead of linking directly against a library</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<div class="cmdsynopsis"><p><code class="command">relaytool</code> [<code class="option">OPTION ...</code>] [<code class="option">LINKER COMMAND ...</code>]</p></div>
</div>
<div class="refsect1">
<a name="id-1.4.9.5"></a><h2>Description</h2>
<p>
This manual page documents briefly the <span class="command"><strong>relaytool</strong></span> command.
</p>
<p>
<span class="command"><strong>relaytool</strong></span> 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.
</p>
<p>
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.
</p>
</div>
<div class="refsect1">
<a name="id-1.4.9.6"></a><h2>Options</h2>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="option">--relay <em class="replaceable"><code>LIB</code></em></code></span></p></td>
<td><p>
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.
</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--replace-all-libs</code></span></p></td>
<td><p>Generate a file for every -lLIB parameter.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--minimal-list <em class="replaceable"><code>OBJ_LIST</code></em></code></span></p></td>
<td><p>
Will look in OBJ_LIST for undefined symbols, and
generate a file creating only the needed symbols
for each LIB.
</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--partial-map <em class="replaceable"><code>MAP_FILE</code></em></code></span></p></td>
<td><p>
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.
</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--no-replace</code></span></p></td>
<td><p>
Echo -lLIB on stdout even if a --relay LIB is
found, so it'll be linked in normally.
</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--multilink <em class="replaceable"><code>[SONAMES...]</code></em></code></span></p></td>
<td><p>
If a library has different SONAMES on different
Linux distributions you can specify the various
SONAMES that it's 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.
</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--out-dir <em class="replaceable"><code>DIRECTORY</code></em></code></span></p></td>
<td><p>Write stub file to DIRECTORY instead of CWD.</p></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="id-1.4.9.7"></a><h2>Linker commands</h2>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="option">-LPATH</code></span></p></td>
<td><p>Add PATH to the list of paths to search for LIBs.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">-lLIB</code></span></p></td>
<td><p>
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's no --relay LIB, echo -lLIB to stdout.
</p></td>
</tr>
</tbody>
</table></div>
<p>All other linker commands are passed as is to stdout.</p>
</div>
<div class="refsect1">
<a name="id-1.4.9.8"></a><h2>Other commands</h2>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span></p></td>
<td><p>Show some help.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--version</code></span></p></td>
<td><p>Display version information of relaytool</p></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="id-1.4.9.9"></a><h2>See Also</h2>
<p>lipkgen (1), ligcc(1), gcc(1).</p>
<p>
Additional documentation can be found on http://listaller.tenstral.net/wiki/doku.php/relaytool.
</p>
</div>
<div class="refsect1">
<a name="id-1.4.9.10"></a><h2>AUTHOR</h2>
<p>This manual page was written by Matthias Klumpp <code class="email"><<a class="email" href="mailto:matthias@tenstral.net">matthias@tenstral.net</a>></code>.
</p>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.20</div>
</body>
</html>
|