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 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
<html>
<head>
<title>
libffi
</title>
</head>
<body>
<h1>libffi - a portable foreign function interface library</h1>
<b>libffi-3.0.4</b> was released on February 22, 2008. You can ftp it
from <a
href="ftp://sourceware.org:/pub/libffi/libffi-3.0.4.tar.gz">sourceware.org:/pub/libffi/libffi-3.0.4.tar.gz</a>.
<p>
libffi is free software. It has a very <a
href="http://sources.redhat.com/cgi-bin/cvsweb.cgi/~checkout~/libffi/LICENSE?rev=1.6&content-type=text/plain&cvsroot=libffi&only_with_tag=MAIN">liberal
license</a>.
<h2>What is libffi?</h2>
Compilers for high level languages generate code that follows certain
conventions. These conventions are necessary, in part, for separate
compilation to work. One such convention is the "calling
convention". The "calling convention" is a set of assumptions made by
the compiler about where function arguments will be found on entry to
a function. A "calling convention" also specifies where the return
value for a function is found.
<p>
Some programs may not know at the time of compilation what arguments
are to be passed to a function. For instance, an interpreter may be
told at run-time about the number and types of arguments used to call
a given function. Libffi can be used in such programs to provide a
bridge from the interpreter program to compiled code.
<p>
The libffi library provides a portable, high level programming
interface to various calling conventions. This allows a programmer to
call any function specified by a call interface description at
run-time.
<p>
FFI stands for Foreign Function Interface. A foreign function
interface is the popular name for the interface that allows code
written in one language to call code written in another language. The
libffi library really only provides the lowest, machine dependent
layer of a fully featured foreign function interface. A layer must
exist above libffi that handles type conversions for values passed
between the two languages.
<h2>Supported Platforms</h2>
Libffi has been ported to many different platforms, although this
release was only tested on:
<ul>
<li> arm oabi linux
<li> arm eabi linux
<li> hppa linux
<li> mips o32 linux (little endian)
<li> powerpc darwin
<li> powerpc64 linux
<li> sparc solaris
<li> sparc64 solaris
<li> x86 cygwin
<li> x86 darwin
<li> x86 freebsd
<li> x86 linux
<li> x86 openbsd
<li> x86-64 darwin
<li> x86-64 linux
<li> x86-64 OS X
<li> x86-64 openbsd
</ul>
Please send additional platform test results to
<a href="mailto:libffi-discuss@sourceware.org">libffi-discuss@sourceware.org</a>.
<h2>How to get it</h2>
You can download the latest version from <a href="ftp://sources.redhat.com/pub/libffi/">sources.redhat.com:/pub/libffi/</a>.
<p>
You can also check out the very latest version via anonymous cvs.
Here's how:
<pre>
cvs -d :pserver:anoncvs@sources.redhat.com:/cvs/libffi login
(password is ``anoncvs'')
cvs -d :pserver:anoncvs@sources.redhat.com:/cvs/libffi co libffi
</pre>
Once you have it checked out, you can update it with <tt>cvs update</tt>.
<p>
You can also <a
href="http://sources.redhat.com/cgi-bin/cvsweb.cgi/libffi/?cvsroot=libffi">
view the cvs archive</a> via cvsweb.
<h2>Mailing lists</h2>
For such a small piece of software, there are plenty of mailing lists
available.
<ul>
<li><a href="/ml/libffi-announce/"><tt>libffi-announce</tt></a> is a
low volume mailing list for libffi release announcements
<li><a href="/ml/libffi-discuss/"><tt>libffi-discuss</tt></a> is a
mailing list for asking questions, reporting bugs, etc.
</ul>
<p>To subscribe to the <code>libffi-announce</code> mailing list, enter your
e-mail address:
<form method="get" action="/cgi-bin/subscribe-sourceware">
<input type="hidden" name="listname" value="libffi-announce">
<input type="text" name="username" size="16"> <input type="Submit" name="submi
t" value="Sign me up!">
</form>
<br>To subscribe to the <code>libffi-discuss</code> mailing list, enter your
e-mail address:
<form method="get" action="/cgi-bin/subscribe-sourceware">
<input type="hidden" name="listname" value="libffi-discuss">
<input type="text" name="username" size="16"> <input type="Submit" name="submi
t" value="Sign me up!">
</form>
<p>
<h2>Authors and Credits</h2>
libffi was originally written by <a href="http://spindazzle.org/greenblog"><b>Anthony Green</b></a>
<p>
The developers of the GNU Compiler Collection project have made
innumerable valuable contributions. See this ChangeLog files in the
source distribution for details.
<p>
Some of the ideas behind libffi were inspired by Gianni Mariani's free
gencall library for Silicon Graphics machines.
<p>
The closure mechanism was designed and implemented by Kresten Krab
Thorup.
<p>
Major processor architecture ports were contributed by the following
developers:
<pre>
alpha Richard Henderson
arm Raffaele Sena
cris Simon Posnjak, Hans-Peter Nilsson
frv Anthony Green
ia64 Hans Boehm
m32r Kazuhiro Inaoka
m68k Andreas Schwab
mips Anthony Green, Casey Marshall
mips64 David Daney
pa Randolph Chung, Dave Anglin, Andreas Tobler
powerpc Geoffrey Keating, Andreas Tobler,
David Edelsohn, John Hornkvist
powerpc64 Jakub Jelinek
s390 Gerhard Tonn, Ulrich Weigand
sh Kaz Kojima
sh64 Kaz Kojima
sparc Anthony Green, Gordon Irlam
x86 Anthony Green, Jon Beniston
x86-64 Bo Thorsen
</pre>
<p>
Jesper Skov and Andrew Haley both did more than their fair share of
stepping through the code and tracking down bugs.
<p>
Thanks also to Tom Tromey for bug fixes, documentation and
configuration help.
<p>
Thanks to Jim Blandy, who provided some useful feedback on the libffi
interface.
<p>
Andreas Tobler has done a tremendous amount of work on the testsuite.
<p>
Alex Oliva solved the executable page problem for SElinux.
<p>
The list above is almost certainly incomplete and inaccurate. I'm
happy to make corrections or additions upon request.
<p>
If you have a problem, or have found a bug, please send a note to
<a href="mailto:libffi-discuss@sources.redhat.com">libffi-discuss@sources.redhat.com</a> or
to me directly (<a href="mailto:green@redhat.com">green@redhat.com</a>).
</body>
</html>