blob: 407f115b0f53bd227d42bbe413ad3b636d64ae9a [file] [log] [blame]
green3ab5cb41998-11-29 16:56:10 +00001<html>
green334f0b01998-11-29 16:56:12 +00002</body>
3<head>
4<title>
5libffi
6</title>
7</head>
8
9<h1>The libffi Home Page</h1>
10
11<b>libffi-1.20</b> was released on October 5, 1998. You can ftp it from <a href="ftp://ftp.cygnus.com:/pub/green/libffi-1.20.tar.gz">ftp.cygnus.com:/pub/green/libffi-1.20.tar.gz</a>.
12
13<p>
14If you wish to be notified of libffi releases by email, fill out <a href="libffi-form.html">this form</a>.
15
16<h2>What is libffi?</h2>
17
18Compilers for high level languages generate code that follow certain
19conventions. These conventions are necessary, in part, for separate
20compilation to work. One such convention is the "calling
21convention". The "calling convention" is essentially a set of
22assumptions made by the compiler about where function arguments will
23be found on entry to a function. A "calling convention" also specifies
24where the return value for a function is found.
25
26<p>
27
28Some programs may not know at the time of compilation what arguments
29are to be passed to a function. For instance, an interpreter may be
30told at run-time about the number and types of arguments used to call
31a given function. Libffi can be used in such programs to provide a
32bridge from the interpreter program to compiled code.
33
34<p>
35
36The libffi library provides a portable, high level programming
37interface to various calling conventions. This allows a programmer to
38call any function specified by a call interface description at run-time.
39
40<p>
41
42Ffi stands for Foreign Function Interface. A foreign function
43interface is the popular name for the interface that allows code
44written in one language to call code written in another language. The
45libffi library really only provides the lowest, machine dependent
46layer of a fully featured foreign function interface. A layer must
47exist above libffi that handles type conversions for values passed
48between the two languages.
49
50<h2>Supported Platforms and Prerequisites</h2>
51
52Libffi has been ported to:
53
54<ul>
55<li> SunOS 4.1.3 & Solaris 2.x (Sparc v8)
56<li> Irix 5.3 & 6.2 (System V/o32 & n32)
57<li> Intel x86 - Linux (System V ABI)
58<li> Alpha Linux and OSF/1
59<li> m68k - Linux (System V ABI)
60<li> PowerPC - Linux (System V ABI)
61<li> ARM - Linux (System V ABI)
62</ul>
63
64Libffi has been tested with the <a href="http://www.cygnus.com/egcs/">egcs</a> 1.0.2 gcc compiler. Chances are
65that other versions will work. Libffi has also been built and tested
66with the SGI compiler tools.
67
68If you port libffi to another platform, please let me know! I assume
69that some will be easy (x86 NetBSD), and others will be more difficult
70(HP, AIX).
71
72<h2>History</h2>
73
74<pre>
751.20 Oct-5-98
76 Raffaele Sena produces ARM port.
77
781.19 Oct-5-98
79 Fixed x86 long double and long long return support.
80 m68k bug fixes from Andreas Schwab.
81 Patch for DU assembler compatibility for the Alpha from Richard
82 Henderson.
83
841.18 Apr-17-98
85 Bug fixes and MIPS configuration changes.
86
871.17 Feb-24-98
88 Bug fixes and m68k port from Andreas Schwab. PowerPC port from
89 Geoffrey Keating. Various bug x86, Sparc and MIPS bug fixes.
90
911.16 Feb-11-98
92 Richard Henderson produces Alpha port.
93
941.15 Dec-4-97
95 Fixed an n32 ABI bug. New libtool, auto* support.
96
971.14 May-13-96
98 libtool is now used to generate shared and static libraries.
99 Fixed a minor portability problem reported by Russ McManus
100 &lt;mcmanr@eq.gs.com&gt;.
101
1021.13 Dec-2-96
103 Added --enable-purify-safety to keep Purify from complaining
104 about certain low level code.
105 Sparc fix for calling functions with < 6 args.
106 Linux x86 a.out fix.
107
1081.12 Nov-22-96
109 Added missing ffi_type_void, needed for supporting void return
110 types. Fixed test case for non MIPS machines. Cygnus Support
111 is now Cygnus Solutions.
112
1131.11 Oct-30-96
114 Added notes about GNU make.
115
1161.10 Oct-29-96
117 Added configuration fix for non GNU compilers.
118
1191.09 Oct-29-96
120 Added --enable-debug configure switch. Clean-ups based on LCLint
121 feedback. ffi_mips.h is always installed. Many configuration
122 fixes. Fixed ffitest.c for sparc builds.
123
1241.08 Oct-15-96
125 Fixed n32 problem. Many clean-ups.
126
1271.07 Oct-14-96
128 Gordon Irlam rewrites v8.S again. Bug fixes.
129
1301.06 Oct-14-96
131 Gordon Irlam improved the sparc port.
132
1331.05 Oct-14-96
134 Interface changes based on feedback.
135
1361.04 Oct-11-96
137 Sparc port complete (modulo struct passing bug).
138
1391.03 Oct-10-96
140 Passing struct args, and returning struct values works for
141 all architectures/calling conventions. Expanded tests.
142
1431.02 Oct-9-96
144 Added SGI n32 support. Fixed bugs in both o32 and Linux support.
145 Added "make test".
146
1471.01 Oct-8-96
148 Fixed float passing bug in mips version. Restructured some
149 of the code. Builds cleanly with SGI tools.
150
1511.00 Oct-7-96
152 First release. No public announcement.
153</pre>
154
155<h2>Authors & Credits</h2>
156
157Libffi was written by <b>Anthony Green</b>.
158<p>
159Portions of libffi were derived from <b>Gianni Mariani</b>'s free gencall
160library for Silicon Graphics machines.
161<p>
162The sparc port was derived from code contributed by the fine folks at
163<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>.
164<p>
165The Alpha port was written by <b>Richard Henderson</b> at Cygnus Solutions.
166<p>
167<b>Andreas Schwab</b> ported libffi to m68k Linux and provided a number of
168bug fixes.
169<p>
170<b>Geoffrey Keating</b> ported libffi to the PowerPC.
171<p>
172<b>Raffaele Sena</b> ported libffi to the ARM.
173<p>
174<b>Jesper Skov</b> and <b>Andrew Haley</b> both did more than their fair share of
175stepping through the code and tracking down bugs.
176<p>
177Thanks to <b>Tom Tromey</b> for bug fixes and configuration help.
178<p>
179Thanks also to <b>Jim Blandy</b>, who provided some useful feedback on the libffi
180interface.
181<p>
182If you have a problem, or have found a bug, please send a note to
183<a href="mailto:green@cygnus.com">green@cygnus.com</a>.
184
185</body>
186</html>