161 lines
5.6 KiB
HTML
161 lines
5.6 KiB
HTML
<html>
|
|
<head>
|
|
<title>
|
|
libffi
|
|
</title>
|
|
</head>
|
|
<body>
|
|
|
|
<h1>The libffi Home Page</h1>
|
|
|
|
<b>libffi-1.20</b> was released on October 5, 1998. You can ftp it
|
|
from <a
|
|
href="ftp://sourceware.cygnus.com:/pub/libffi/libffi-1.20.tar.gz">sourceware.cygnus.com:/pub/libffi/libffi-1.20.tar.gz</a>.
|
|
However, newer code is available. See below for details.
|
|
|
|
<p>
|
|
|
|
libffi is free software. It has a very <a
|
|
href="http://sourceware.cygnus.com/cgi-bin/cvsweb.cgi/~checkout~/libffi/LICENSE?rev=1.1&cvsroot=libffi&hideattic=1&sortbydate=0">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:
|
|
|
|
<ul>
|
|
<li> SunOS 4.1.3 & Solaris 2.x (Sparc v8)
|
|
<li> Irix 5.3 & 6.2 (System V/o32 & n32)
|
|
<li> Intel x86 - Linux (System V ABI)
|
|
<li> Alpha Linux and OSF/1
|
|
<li> m68k - Linux (System V ABI)
|
|
<li> PowerPC - Linux (System V ABI)
|
|
<li> ARM - Linux (System V ABI)
|
|
</ul>
|
|
|
|
Libffi has been tested with the <a
|
|
href="http://www.cygnus.com/egcs/">egcs</a> 1.0.2 gcc
|
|
compiler. Chances are that other versions will work. Libffi has also
|
|
been built and tested with the SGI compiler tools.
|
|
|
|
If you port libffi to another platform, please let me know! I assume
|
|
that some will be easy (x86 NetBSD), and others will be more difficult
|
|
(HP, AIX).
|
|
|
|
<h2>How to get it</h2>
|
|
|
|
You can download the latest version from <a href="ftp://sourceware.cygnus.com/pub/libffi/">sourceware.cygnus.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@sourceware.cygnus.com:/cvs/libffi login
|
|
(password is ``anoncvs'')
|
|
cvs -d :pserver:anoncvs@sourceware.cygnus.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://sourceware.cygnus.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 written by <a href="http://www.cygnus.com/~green/"><b>Anthony Green</b></a>.
|
|
|
|
<ul>
|
|
<li> Portions of libffi were derived from <b>Gianni Mariani</b>'s free gencall
|
|
library for Silicon Graphics machines.
|
|
<li> The sparc port was derived from code contributed by the fine folks at
|
|
<b><a href="http://www.vdi.com">Visible Decisions Inc</a></b>. Further enhancements were made by <b>Gordon Irlam</b> at <a href="http://www.cygnus.com">Cygnus Solutions</a>.
|
|
<li>The Alpha port was written by <b>Richard Henderson</b> at Cygnus Solutions.
|
|
<li><b>Andreas Schwab</b> ported libffi to m68k Linux and provided a number of
|
|
bug fixes.
|
|
<li><b>Geoffrey Keating</b> ported libffi to the PowerPC.
|
|
<li><b>Raffaele Sena</b> ported libffi to the ARM.
|
|
<li><b>Jesper Skov</b> and <b>Andrew Haley</b> both did more than their fair share of
|
|
stepping through the code and tracking down bugs.
|
|
<li>
|
|
Thanks to <b>Tom Tromey</b> for bug fixes and configuration help.
|
|
<li>
|
|
Thanks also to <b>Jim Blandy</b>, who provided some useful feedback on the libffi
|
|
interface.
|
|
</ul>
|
|
<p>
|
|
If you have a problem, or have found a bug, please send a note to
|
|
<a href="mailto:libffi-discuss@sourceware.cygnus.com">libffi-discuss@sourceware.cygnus.com</a> or
|
|
to me directly (<a href="mailto:green@cygnus.com">green@cygnus.com</a>).
|
|
|
|
</body>
|
|
</html>
|