blob: 910af5f7e3d650decc6fbd1cae0cde05f29f6461 [file] [log] [blame]
green3ab5cb41998-11-29 16:56:10 +00001<html>
green334f0b01998-11-29 16:56:12 +00002<head>
3<title>
4libffi
5</title>
6</head>
jsmbfb73f01998-11-30 10:44:55 +00007<body>
green334f0b01998-11-29 16:56:12 +00008
green2b595792008-02-14 23:35:58 +00009<h1>libffi - a portable foreign function interface library</h1>
green334f0b01998-11-29 16:56:12 +000010
green37040312008-04-03 18:57:57 +000011<b>libffi-3.0.5</b> was released on April 3, 2008. You can ftp it
greenaf8b7f01998-11-30 06:20:05 +000012from <a
green37040312008-04-03 18:57:57 +000013href="ftp://sourceware.org:/pub/libffi/libffi-3.0.5.tar.gz">sourceware.org:/pub/libffi/libffi-3.0.5.tar.gz</a>.
green334f0b01998-11-29 16:56:12 +000014
15<p>
greenaf8b7f01998-11-30 06:20:05 +000016
17libffi is free software. It has a very <a
green49d345f2008-02-14 23:43:27 +000018href="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
greenaf8b7f01998-11-30 06:20:05 +000019license</a>.
green334f0b01998-11-29 16:56:12 +000020
21<h2>What is libffi?</h2>
22
jsmb4d77e81998-11-30 11:11:25 +000023Compilers for high level languages generate code that follows certain
green334f0b01998-11-29 16:56:12 +000024conventions. These conventions are necessary, in part, for separate
25compilation to work. One such convention is the "calling
greenaf8b7f01998-11-30 06:20:05 +000026convention". The "calling convention" is a set of assumptions made by
27the compiler about where function arguments will be found on entry to
28a function. A "calling convention" also specifies where the return
29value for a function is found.
green334f0b01998-11-29 16:56:12 +000030
31<p>
32
33Some programs may not know at the time of compilation what arguments
34are to be passed to a function. For instance, an interpreter may be
35told at run-time about the number and types of arguments used to call
36a given function. Libffi can be used in such programs to provide a
37bridge from the interpreter program to compiled code.
38
39<p>
40
41The libffi library provides a portable, high level programming
42interface to various calling conventions. This allows a programmer to
greenaf8b7f01998-11-30 06:20:05 +000043call any function specified by a call interface description at
44run-time.
green334f0b01998-11-29 16:56:12 +000045
46<p>
47
green2b595792008-02-14 23:35:58 +000048FFI stands for Foreign Function Interface. A foreign function
green334f0b01998-11-29 16:56:12 +000049interface is the popular name for the interface that allows code
50written in one language to call code written in another language. The
51libffi library really only provides the lowest, machine dependent
52layer of a fully featured foreign function interface. A layer must
53exist above libffi that handles type conversions for values passed
54between the two languages.
55
greenaf8b7f01998-11-30 06:20:05 +000056<h2>Supported Platforms</h2>
green334f0b01998-11-29 16:56:12 +000057
green2b595792008-02-14 23:35:58 +000058Libffi has been ported to many different platforms, although this
59release was only tested on:
green334f0b01998-11-29 16:56:12 +000060
61<ul>
green2b595792008-02-14 23:35:58 +000062<li> arm oabi linux
63<li> arm eabi linux
green45a45ab2008-02-15 19:16:36 +000064<li> hppa linux
65<li> mips o32 linux (little endian)
greend58b0322008-02-15 00:59:25 +000066<li> powerpc darwin
green2b595792008-02-14 23:35:58 +000067<li> powerpc64 linux
green59aa6bb2008-02-15 20:52:26 +000068<li> sparc solaris
69<li> sparc64 solaris
green2b595792008-02-14 23:35:58 +000070<li> x86 cygwin
greend58b0322008-02-15 00:59:25 +000071<li> x86 darwin
green1edd4562008-02-21 13:39:01 +000072<li> x86 freebsd
green2b595792008-02-14 23:35:58 +000073<li> x86 linux
green3e53d872008-02-22 21:52:38 +000074<li> x86 openbsd
green59aa6bb2008-02-15 20:52:26 +000075<li> x86-64 darwin
green2b595792008-02-14 23:35:58 +000076<li> x86-64 linux
greend58b0322008-02-15 00:59:25 +000077<li> x86-64 OS X
green3e53d872008-02-22 21:52:38 +000078<li> x86-64 openbsd
green334f0b01998-11-29 16:56:12 +000079</ul>
80
greend58b0322008-02-15 00:59:25 +000081Please send additional platform test results to
82<a href="mailto:libffi-discuss@sourceware.org">libffi-discuss@sourceware.org</a>.
green334f0b01998-11-29 16:56:12 +000083
greenaf8b7f01998-11-30 06:20:05 +000084<h2>How to get it</h2>
green334f0b01998-11-29 16:56:12 +000085
green1c3adc82002-12-06 01:28:03 +000086You can download the latest version from <a href="ftp://sources.redhat.com/pub/libffi/">sources.redhat.com:/pub/libffi/</a>.
greenaf8b7f01998-11-30 06:20:05 +000087
88<p>
89
90You can also check out the very latest version via anonymous cvs.
91Here's how:
green334f0b01998-11-29 16:56:12 +000092<pre>
green1c3adc82002-12-06 01:28:03 +000093 cvs -d :pserver:anoncvs@sources.redhat.com:/cvs/libffi login
greenaf8b7f01998-11-30 06:20:05 +000094 (password is ``anoncvs'')
green1c3adc82002-12-06 01:28:03 +000095 cvs -d :pserver:anoncvs@sources.redhat.com:/cvs/libffi co libffi
green334f0b01998-11-29 16:56:12 +000096</pre>
97
greenaf8b7f01998-11-30 06:20:05 +000098Once you have it checked out, you can update it with <tt>cvs update</tt>.
green334f0b01998-11-29 16:56:12 +000099
green334f0b01998-11-29 16:56:12 +0000100<p>
greenaf8b7f01998-11-30 06:20:05 +0000101
102You can also <a
green1c3adc82002-12-06 01:28:03 +0000103href="http://sources.redhat.com/cgi-bin/cvsweb.cgi/libffi/?cvsroot=libffi">
greenaf8b7f01998-11-30 06:20:05 +0000104view the cvs archive</a> via cvsweb.
105
106<h2>Mailing lists</h2>
107
108For such a small piece of software, there are plenty of mailing lists
109available.
110
111<ul>
jsmc7747d91999-05-12 23:32:16 +0000112<li><a href="/ml/libffi-announce/"><tt>libffi-announce</tt></a> is a
113 low volume mailing list for libffi release announcements
114<li><a href="/ml/libffi-discuss/"><tt>libffi-discuss</tt></a> is a
115 mailing list for asking questions, reporting bugs, etc.
greenaf8b7f01998-11-30 06:20:05 +0000116</ul>
117
118<p>To subscribe to the <code>libffi-announce</code> mailing list, enter your
119e-mail address:
jsmebc6a9c1999-04-26 15:53:29 +0000120<form method="get" action="/cgi-bin/subscribe-sourceware">
jsmbfb73f01998-11-30 10:44:55 +0000121 <input type="hidden" name="listname" value="libffi-announce">
122 <input type="text" name="username" size="16"> <input type="Submit" name="submi
123t" value="Sign me up!">
greenaf8b7f01998-11-30 06:20:05 +0000124</form>
125
126<br>To subscribe to the <code>libffi-discuss</code> mailing list, enter your
127e-mail address:
jsmebc6a9c1999-04-26 15:53:29 +0000128<form method="get" action="/cgi-bin/subscribe-sourceware">
jsmbfb73f01998-11-30 10:44:55 +0000129 <input type="hidden" name="listname" value="libffi-discuss">
130 <input type="text" name="username" size="16"> <input type="Submit" name="submi
131t" value="Sign me up!">
greenaf8b7f01998-11-30 06:20:05 +0000132</form>
133
134<p>
135
136<h2>Authors and Credits</h2>
137
green2b595792008-02-14 23:35:58 +0000138libffi was originally written by <a href="http://spindazzle.org/greenblog"><b>Anthony Green</b></a>
greenaf8b7f01998-11-30 06:20:05 +0000139
green2b595792008-02-14 23:35:58 +0000140<p>
141The developers of the GNU Compiler Collection project have made
greend58b0322008-02-15 00:59:25 +0000142innumerable valuable contributions. See this ChangeLog files in the
143source distribution for details.
green2b595792008-02-14 23:35:58 +0000144
145<p>
146Some of the ideas behind libffi were inspired by Gianni Mariani's free
147gencall library for Silicon Graphics machines.
148
149<p>
150The closure mechanism was designed and implemented by Kresten Krab
151Thorup.
152
153<p>
154Major processor architecture ports were contributed by the following
155developers:
156
157<pre>
158alpha Richard Henderson
159arm Raffaele Sena
160cris Simon Posnjak, Hans-Peter Nilsson
161frv Anthony Green
162ia64 Hans Boehm
163m32r Kazuhiro Inaoka
164m68k Andreas Schwab
green45a45ab2008-02-15 19:16:36 +0000165mips Anthony Green, Casey Marshall
green2b595792008-02-14 23:35:58 +0000166mips64 David Daney
green45a45ab2008-02-15 19:16:36 +0000167pa Randolph Chung, Dave Anglin, Andreas Tobler
168powerpc Geoffrey Keating, Andreas Tobler,
169 David Edelsohn, John Hornkvist
green2b595792008-02-14 23:35:58 +0000170powerpc64 Jakub Jelinek
171s390 Gerhard Tonn, Ulrich Weigand
172sh Kaz Kojima
173sh64 Kaz Kojima
174sparc Anthony Green, Gordon Irlam
green45a45ab2008-02-15 19:16:36 +0000175x86 Anthony Green, Jon Beniston
green2b595792008-02-14 23:35:58 +0000176x86-64 Bo Thorsen
177</pre>
178
179<p>
180Jesper Skov and Andrew Haley both did more than their fair share of
green334f0b01998-11-29 16:56:12 +0000181stepping through the code and tracking down bugs.
green2b595792008-02-14 23:35:58 +0000182
183<p>
184Thanks also to Tom Tromey for bug fixes, documentation and
185configuration help.
186
187<p>
188Thanks to Jim Blandy, who provided some useful feedback on the libffi
green334f0b01998-11-29 16:56:12 +0000189interface.
green2b595792008-02-14 23:35:58 +0000190
191<p>
192Andreas Tobler has done a tremendous amount of work on the testsuite.
193
194<p>
green45a45ab2008-02-15 19:16:36 +0000195Alex Oliva solved the executable page problem for SElinux.
196
197<p>
green2b595792008-02-14 23:35:58 +0000198The list above is almost certainly incomplete and inaccurate. I'm
199happy to make corrections or additions upon request.
200
green334f0b01998-11-29 16:56:12 +0000201<p>
202If you have a problem, or have found a bug, please send a note to
green1c3adc82002-12-06 01:28:03 +0000203<a href="mailto:libffi-discuss@sources.redhat.com">libffi-discuss@sources.redhat.com</a> or
204to me directly (<a href="mailto:green@redhat.com">green@redhat.com</a>).
green334f0b01998-11-29 16:56:12 +0000205
green51e79c42008-02-28 04:47:35 +0000206<script src="http://static.getclicky.com/26763.js" type="text/javascript"></script>
green51e79c42008-02-28 04:47:35 +0000207
green334f0b01998-11-29 16:56:12 +0000208</body>
209</html>