green | 3ab5cb4 | 1998-11-29 16:56:10 +0000 | [diff] [blame] | 1 | <html> |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame^] | 2 | </body> |
| 3 | <head> |
| 4 | <title> |
| 5 | libffi |
| 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> |
| 14 | If 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 | |
| 18 | Compilers for high level languages generate code that follow certain |
| 19 | conventions. These conventions are necessary, in part, for separate |
| 20 | compilation to work. One such convention is the "calling |
| 21 | convention". The "calling convention" is essentially a set of |
| 22 | assumptions made by the compiler about where function arguments will |
| 23 | be found on entry to a function. A "calling convention" also specifies |
| 24 | where the return value for a function is found. |
| 25 | |
| 26 | <p> |
| 27 | |
| 28 | Some programs may not know at the time of compilation what arguments |
| 29 | are to be passed to a function. For instance, an interpreter may be |
| 30 | told at run-time about the number and types of arguments used to call |
| 31 | a given function. Libffi can be used in such programs to provide a |
| 32 | bridge from the interpreter program to compiled code. |
| 33 | |
| 34 | <p> |
| 35 | |
| 36 | The libffi library provides a portable, high level programming |
| 37 | interface to various calling conventions. This allows a programmer to |
| 38 | call any function specified by a call interface description at run-time. |
| 39 | |
| 40 | <p> |
| 41 | |
| 42 | Ffi stands for Foreign Function Interface. A foreign function |
| 43 | interface is the popular name for the interface that allows code |
| 44 | written in one language to call code written in another language. The |
| 45 | libffi library really only provides the lowest, machine dependent |
| 46 | layer of a fully featured foreign function interface. A layer must |
| 47 | exist above libffi that handles type conversions for values passed |
| 48 | between the two languages. |
| 49 | |
| 50 | <h2>Supported Platforms and Prerequisites</h2> |
| 51 | |
| 52 | Libffi 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 | |
| 64 | Libffi has been tested with the <a href="http://www.cygnus.com/egcs/">egcs</a> 1.0.2 gcc compiler. Chances are |
| 65 | that other versions will work. Libffi has also been built and tested |
| 66 | with the SGI compiler tools. |
| 67 | |
| 68 | If you port libffi to another platform, please let me know! I assume |
| 69 | that some will be easy (x86 NetBSD), and others will be more difficult |
| 70 | (HP, AIX). |
| 71 | |
| 72 | <h2>History</h2> |
| 73 | |
| 74 | <pre> |
| 75 | 1.20 Oct-5-98 |
| 76 | Raffaele Sena produces ARM port. |
| 77 | |
| 78 | 1.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 | |
| 84 | 1.18 Apr-17-98 |
| 85 | Bug fixes and MIPS configuration changes. |
| 86 | |
| 87 | 1.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 | |
| 91 | 1.16 Feb-11-98 |
| 92 | Richard Henderson produces Alpha port. |
| 93 | |
| 94 | 1.15 Dec-4-97 |
| 95 | Fixed an n32 ABI bug. New libtool, auto* support. |
| 96 | |
| 97 | 1.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 | <mcmanr@eq.gs.com>. |
| 101 | |
| 102 | 1.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 | |
| 108 | 1.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 | |
| 113 | 1.11 Oct-30-96 |
| 114 | Added notes about GNU make. |
| 115 | |
| 116 | 1.10 Oct-29-96 |
| 117 | Added configuration fix for non GNU compilers. |
| 118 | |
| 119 | 1.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 | |
| 124 | 1.08 Oct-15-96 |
| 125 | Fixed n32 problem. Many clean-ups. |
| 126 | |
| 127 | 1.07 Oct-14-96 |
| 128 | Gordon Irlam rewrites v8.S again. Bug fixes. |
| 129 | |
| 130 | 1.06 Oct-14-96 |
| 131 | Gordon Irlam improved the sparc port. |
| 132 | |
| 133 | 1.05 Oct-14-96 |
| 134 | Interface changes based on feedback. |
| 135 | |
| 136 | 1.04 Oct-11-96 |
| 137 | Sparc port complete (modulo struct passing bug). |
| 138 | |
| 139 | 1.03 Oct-10-96 |
| 140 | Passing struct args, and returning struct values works for |
| 141 | all architectures/calling conventions. Expanded tests. |
| 142 | |
| 143 | 1.02 Oct-9-96 |
| 144 | Added SGI n32 support. Fixed bugs in both o32 and Linux support. |
| 145 | Added "make test". |
| 146 | |
| 147 | 1.01 Oct-8-96 |
| 148 | Fixed float passing bug in mips version. Restructured some |
| 149 | of the code. Builds cleanly with SGI tools. |
| 150 | |
| 151 | 1.00 Oct-7-96 |
| 152 | First release. No public announcement. |
| 153 | </pre> |
| 154 | |
| 155 | <h2>Authors & Credits</h2> |
| 156 | |
| 157 | Libffi was written by <b>Anthony Green</b>. |
| 158 | <p> |
| 159 | Portions of libffi were derived from <b>Gianni Mariani</b>'s free gencall |
| 160 | library for Silicon Graphics machines. |
| 161 | <p> |
| 162 | The 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> |
| 165 | The 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 |
| 168 | bug 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 |
| 175 | stepping through the code and tracking down bugs. |
| 176 | <p> |
| 177 | Thanks to <b>Tom Tromey</b> for bug fixes and configuration help. |
| 178 | <p> |
| 179 | Thanks also to <b>Jim Blandy</b>, who provided some useful feedback on the libffi |
| 180 | interface. |
| 181 | <p> |
| 182 | If 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> |