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 | <head> |
| 3 | <title> |
| 4 | libffi |
| 5 | </title> |
| 6 | </head> |
jsm | bfb73f0 | 1998-11-30 10:44:55 +0000 | [diff] [blame] | 7 | <body> |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 8 | |
green | 2b59579 | 2008-02-14 23:35:58 +0000 | [diff] [blame] | 9 | <h1>libffi - a portable foreign function interface library</h1> |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 10 | |
green | 3704031 | 2008-04-03 18:57:57 +0000 | [diff] [blame] | 11 | <b>libffi-3.0.5</b> was released on April 3, 2008. You can ftp it |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 12 | from <a |
green | 3704031 | 2008-04-03 18:57:57 +0000 | [diff] [blame] | 13 | href="ftp://sourceware.org:/pub/libffi/libffi-3.0.5.tar.gz">sourceware.org:/pub/libffi/libffi-3.0.5.tar.gz</a>. |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 14 | |
| 15 | <p> |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 16 | |
| 17 | libffi is free software. It has a very <a |
green | 49d345f | 2008-02-14 23:43:27 +0000 | [diff] [blame] | 18 | 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 |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 19 | license</a>. |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 20 | |
| 21 | <h2>What is libffi?</h2> |
| 22 | |
jsm | b4d77e8 | 1998-11-30 11:11:25 +0000 | [diff] [blame] | 23 | Compilers for high level languages generate code that follows certain |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 24 | conventions. These conventions are necessary, in part, for separate |
| 25 | compilation to work. One such convention is the "calling |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 26 | convention". The "calling convention" is a set of assumptions made by |
| 27 | the compiler about where function arguments will be found on entry to |
| 28 | a function. A "calling convention" also specifies where the return |
| 29 | value for a function is found. |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 30 | |
| 31 | <p> |
| 32 | |
| 33 | Some programs may not know at the time of compilation what arguments |
| 34 | are to be passed to a function. For instance, an interpreter may be |
| 35 | told at run-time about the number and types of arguments used to call |
| 36 | a given function. Libffi can be used in such programs to provide a |
| 37 | bridge from the interpreter program to compiled code. |
| 38 | |
| 39 | <p> |
| 40 | |
| 41 | The libffi library provides a portable, high level programming |
| 42 | interface to various calling conventions. This allows a programmer to |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 43 | call any function specified by a call interface description at |
| 44 | run-time. |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 45 | |
| 46 | <p> |
| 47 | |
green | 2b59579 | 2008-02-14 23:35:58 +0000 | [diff] [blame] | 48 | FFI stands for Foreign Function Interface. A foreign function |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 49 | interface is the popular name for the interface that allows code |
| 50 | written in one language to call code written in another language. The |
| 51 | libffi library really only provides the lowest, machine dependent |
| 52 | layer of a fully featured foreign function interface. A layer must |
| 53 | exist above libffi that handles type conversions for values passed |
| 54 | between the two languages. |
| 55 | |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 56 | <h2>Supported Platforms</h2> |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 57 | |
green | 2b59579 | 2008-02-14 23:35:58 +0000 | [diff] [blame] | 58 | Libffi has been ported to many different platforms, although this |
| 59 | release was only tested on: |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 60 | |
| 61 | <ul> |
green | 2b59579 | 2008-02-14 23:35:58 +0000 | [diff] [blame] | 62 | <li> arm oabi linux |
| 63 | <li> arm eabi linux |
green | 45a45ab | 2008-02-15 19:16:36 +0000 | [diff] [blame] | 64 | <li> hppa linux |
| 65 | <li> mips o32 linux (little endian) |
green | d58b032 | 2008-02-15 00:59:25 +0000 | [diff] [blame] | 66 | <li> powerpc darwin |
green | 2b59579 | 2008-02-14 23:35:58 +0000 | [diff] [blame] | 67 | <li> powerpc64 linux |
green | 59aa6bb | 2008-02-15 20:52:26 +0000 | [diff] [blame] | 68 | <li> sparc solaris |
| 69 | <li> sparc64 solaris |
green | 2b59579 | 2008-02-14 23:35:58 +0000 | [diff] [blame] | 70 | <li> x86 cygwin |
green | d58b032 | 2008-02-15 00:59:25 +0000 | [diff] [blame] | 71 | <li> x86 darwin |
green | 1edd456 | 2008-02-21 13:39:01 +0000 | [diff] [blame] | 72 | <li> x86 freebsd |
green | 2b59579 | 2008-02-14 23:35:58 +0000 | [diff] [blame] | 73 | <li> x86 linux |
green | 3e53d87 | 2008-02-22 21:52:38 +0000 | [diff] [blame] | 74 | <li> x86 openbsd |
green | 59aa6bb | 2008-02-15 20:52:26 +0000 | [diff] [blame] | 75 | <li> x86-64 darwin |
green | 2b59579 | 2008-02-14 23:35:58 +0000 | [diff] [blame] | 76 | <li> x86-64 linux |
green | d58b032 | 2008-02-15 00:59:25 +0000 | [diff] [blame] | 77 | <li> x86-64 OS X |
green | 3e53d87 | 2008-02-22 21:52:38 +0000 | [diff] [blame] | 78 | <li> x86-64 openbsd |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 79 | </ul> |
| 80 | |
green | d58b032 | 2008-02-15 00:59:25 +0000 | [diff] [blame] | 81 | Please send additional platform test results to |
| 82 | <a href="mailto:libffi-discuss@sourceware.org">libffi-discuss@sourceware.org</a>. |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 83 | |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 84 | <h2>How to get it</h2> |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 85 | |
green | 1c3adc8 | 2002-12-06 01:28:03 +0000 | [diff] [blame] | 86 | You can download the latest version from <a href="ftp://sources.redhat.com/pub/libffi/">sources.redhat.com:/pub/libffi/</a>. |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 87 | |
| 88 | <p> |
| 89 | |
| 90 | You can also check out the very latest version via anonymous cvs. |
| 91 | Here's how: |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 92 | <pre> |
green | 1c3adc8 | 2002-12-06 01:28:03 +0000 | [diff] [blame] | 93 | cvs -d :pserver:anoncvs@sources.redhat.com:/cvs/libffi login |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 94 | (password is ``anoncvs'') |
green | 1c3adc8 | 2002-12-06 01:28:03 +0000 | [diff] [blame] | 95 | cvs -d :pserver:anoncvs@sources.redhat.com:/cvs/libffi co libffi |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 96 | </pre> |
| 97 | |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 98 | Once you have it checked out, you can update it with <tt>cvs update</tt>. |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 99 | |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 100 | <p> |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 101 | |
| 102 | You can also <a |
green | 1c3adc8 | 2002-12-06 01:28:03 +0000 | [diff] [blame] | 103 | href="http://sources.redhat.com/cgi-bin/cvsweb.cgi/libffi/?cvsroot=libffi"> |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 104 | view the cvs archive</a> via cvsweb. |
| 105 | |
| 106 | <h2>Mailing lists</h2> |
| 107 | |
| 108 | For such a small piece of software, there are plenty of mailing lists |
| 109 | available. |
| 110 | |
| 111 | <ul> |
jsm | c7747d9 | 1999-05-12 23:32:16 +0000 | [diff] [blame] | 112 | <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. |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 116 | </ul> |
| 117 | |
| 118 | <p>To subscribe to the <code>libffi-announce</code> mailing list, enter your |
| 119 | e-mail address: |
jsm | ebc6a9c | 1999-04-26 15:53:29 +0000 | [diff] [blame] | 120 | <form method="get" action="/cgi-bin/subscribe-sourceware"> |
jsm | bfb73f0 | 1998-11-30 10:44:55 +0000 | [diff] [blame] | 121 | <input type="hidden" name="listname" value="libffi-announce"> |
| 122 | <input type="text" name="username" size="16"> <input type="Submit" name="submi |
| 123 | t" value="Sign me up!"> |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 124 | </form> |
| 125 | |
| 126 | <br>To subscribe to the <code>libffi-discuss</code> mailing list, enter your |
| 127 | e-mail address: |
jsm | ebc6a9c | 1999-04-26 15:53:29 +0000 | [diff] [blame] | 128 | <form method="get" action="/cgi-bin/subscribe-sourceware"> |
jsm | bfb73f0 | 1998-11-30 10:44:55 +0000 | [diff] [blame] | 129 | <input type="hidden" name="listname" value="libffi-discuss"> |
| 130 | <input type="text" name="username" size="16"> <input type="Submit" name="submi |
| 131 | t" value="Sign me up!"> |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 132 | </form> |
| 133 | |
| 134 | <p> |
| 135 | |
| 136 | <h2>Authors and Credits</h2> |
| 137 | |
green | 2b59579 | 2008-02-14 23:35:58 +0000 | [diff] [blame] | 138 | libffi was originally written by <a href="http://spindazzle.org/greenblog"><b>Anthony Green</b></a> |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 139 | |
green | 2b59579 | 2008-02-14 23:35:58 +0000 | [diff] [blame] | 140 | <p> |
| 141 | The developers of the GNU Compiler Collection project have made |
green | d58b032 | 2008-02-15 00:59:25 +0000 | [diff] [blame] | 142 | innumerable valuable contributions. See this ChangeLog files in the |
| 143 | source distribution for details. |
green | 2b59579 | 2008-02-14 23:35:58 +0000 | [diff] [blame] | 144 | |
| 145 | <p> |
| 146 | Some of the ideas behind libffi were inspired by Gianni Mariani's free |
| 147 | gencall library for Silicon Graphics machines. |
| 148 | |
| 149 | <p> |
| 150 | The closure mechanism was designed and implemented by Kresten Krab |
| 151 | Thorup. |
| 152 | |
| 153 | <p> |
| 154 | Major processor architecture ports were contributed by the following |
| 155 | developers: |
| 156 | |
| 157 | <pre> |
| 158 | alpha Richard Henderson |
| 159 | arm Raffaele Sena |
| 160 | cris Simon Posnjak, Hans-Peter Nilsson |
| 161 | frv Anthony Green |
| 162 | ia64 Hans Boehm |
| 163 | m32r Kazuhiro Inaoka |
| 164 | m68k Andreas Schwab |
green | 45a45ab | 2008-02-15 19:16:36 +0000 | [diff] [blame] | 165 | mips Anthony Green, Casey Marshall |
green | 2b59579 | 2008-02-14 23:35:58 +0000 | [diff] [blame] | 166 | mips64 David Daney |
green | 45a45ab | 2008-02-15 19:16:36 +0000 | [diff] [blame] | 167 | pa Randolph Chung, Dave Anglin, Andreas Tobler |
| 168 | powerpc Geoffrey Keating, Andreas Tobler, |
| 169 | David Edelsohn, John Hornkvist |
green | 2b59579 | 2008-02-14 23:35:58 +0000 | [diff] [blame] | 170 | powerpc64 Jakub Jelinek |
| 171 | s390 Gerhard Tonn, Ulrich Weigand |
| 172 | sh Kaz Kojima |
| 173 | sh64 Kaz Kojima |
| 174 | sparc Anthony Green, Gordon Irlam |
green | 45a45ab | 2008-02-15 19:16:36 +0000 | [diff] [blame] | 175 | x86 Anthony Green, Jon Beniston |
green | 2b59579 | 2008-02-14 23:35:58 +0000 | [diff] [blame] | 176 | x86-64 Bo Thorsen |
| 177 | </pre> |
| 178 | |
| 179 | <p> |
| 180 | Jesper Skov and Andrew Haley both did more than their fair share of |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 181 | stepping through the code and tracking down bugs. |
green | 2b59579 | 2008-02-14 23:35:58 +0000 | [diff] [blame] | 182 | |
| 183 | <p> |
| 184 | Thanks also to Tom Tromey for bug fixes, documentation and |
| 185 | configuration help. |
| 186 | |
| 187 | <p> |
| 188 | Thanks to Jim Blandy, who provided some useful feedback on the libffi |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 189 | interface. |
green | 2b59579 | 2008-02-14 23:35:58 +0000 | [diff] [blame] | 190 | |
| 191 | <p> |
| 192 | Andreas Tobler has done a tremendous amount of work on the testsuite. |
| 193 | |
| 194 | <p> |
green | 45a45ab | 2008-02-15 19:16:36 +0000 | [diff] [blame] | 195 | Alex Oliva solved the executable page problem for SElinux. |
| 196 | |
| 197 | <p> |
green | 2b59579 | 2008-02-14 23:35:58 +0000 | [diff] [blame] | 198 | The list above is almost certainly incomplete and inaccurate. I'm |
| 199 | happy to make corrections or additions upon request. |
| 200 | |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 201 | <p> |
| 202 | If you have a problem, or have found a bug, please send a note to |
green | 1c3adc8 | 2002-12-06 01:28:03 +0000 | [diff] [blame] | 203 | <a href="mailto:libffi-discuss@sources.redhat.com">libffi-discuss@sources.redhat.com</a> or |
| 204 | to me directly (<a href="mailto:green@redhat.com">green@redhat.com</a>). |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 205 | |
green | 51e79c4 | 2008-02-28 04:47:35 +0000 | [diff] [blame] | 206 | <script src="http://static.getclicky.com/26763.js" type="text/javascript"></script> |
green | 51e79c4 | 2008-02-28 04:47:35 +0000 | [diff] [blame] | 207 | |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 208 | </body> |
| 209 | </html> |