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 | |
| 9 | <h1>The libffi Home Page</h1> |
| 10 | |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 11 | <b>libffi-1.20</b> was released on October 5, 1998. You can ftp it |
| 12 | from <a |
| 13 | href="ftp://ftp.cygnus.com:/pub/green/libffi-1.20.tar.gz">ftp.cygnus.com:/pub/green/libffi-1.20.tar.gz</a>. |
| 14 | However, newer code is available. See below for details. |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 15 | |
| 16 | <p> |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 17 | |
| 18 | libffi is free software. It has a very <a |
| 19 | href="http://sourceware.cygnus.com/cgi-bin/cvsweb.cgi/~checkout~/libffi/LICENSE?rev=1.1&cvsroot=libffi&hideattic=1&sortbydate=0">liberal |
| 20 | license</a>. |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 21 | |
| 22 | <h2>What is libffi?</h2> |
| 23 | |
jsm | b4d77e8 | 1998-11-30 11:11:25 +0000 | [diff] [blame^] | 24 | Compilers for high level languages generate code that follows certain |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 25 | conventions. These conventions are necessary, in part, for separate |
| 26 | compilation to work. One such convention is the "calling |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 27 | convention". The "calling convention" is a set of assumptions made by |
| 28 | the compiler about where function arguments will be found on entry to |
| 29 | a function. A "calling convention" also specifies where the return |
| 30 | value for a function is found. |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 31 | |
| 32 | <p> |
| 33 | |
| 34 | Some programs may not know at the time of compilation what arguments |
| 35 | are to be passed to a function. For instance, an interpreter may be |
| 36 | told at run-time about the number and types of arguments used to call |
| 37 | a given function. Libffi can be used in such programs to provide a |
| 38 | bridge from the interpreter program to compiled code. |
| 39 | |
| 40 | <p> |
| 41 | |
| 42 | The libffi library provides a portable, high level programming |
| 43 | interface to various calling conventions. This allows a programmer to |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 44 | call any function specified by a call interface description at |
| 45 | run-time. |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 46 | |
| 47 | <p> |
| 48 | |
| 49 | Ffi stands for Foreign Function Interface. A foreign function |
| 50 | interface is the popular name for the interface that allows code |
| 51 | written in one language to call code written in another language. The |
| 52 | libffi library really only provides the lowest, machine dependent |
| 53 | layer of a fully featured foreign function interface. A layer must |
| 54 | exist above libffi that handles type conversions for values passed |
| 55 | between the two languages. |
| 56 | |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 57 | <h2>Supported Platforms</h2> |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 58 | |
| 59 | Libffi has been ported to: |
| 60 | |
| 61 | <ul> |
jsm | bfb73f0 | 1998-11-30 10:44:55 +0000 | [diff] [blame] | 62 | <li> SunOS 4.1.3 & Solaris 2.x (Sparc v8) |
| 63 | <li> Irix 5.3 & 6.2 (System V/o32 & n32) |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 64 | <li> Intel x86 - Linux (System V ABI) |
| 65 | <li> Alpha Linux and OSF/1 |
| 66 | <li> m68k - Linux (System V ABI) |
| 67 | <li> PowerPC - Linux (System V ABI) |
| 68 | <li> ARM - Linux (System V ABI) |
| 69 | </ul> |
| 70 | |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 71 | Libffi has been tested with the <a |
| 72 | href="http://www.cygnus.com/egcs/">egcs</a> 1.0.2 gcc |
| 73 | compiler. Chances are that other versions will work. Libffi has also |
| 74 | been built and tested with the SGI compiler tools. |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 75 | |
| 76 | If you port libffi to another platform, please let me know! I assume |
| 77 | that some will be easy (x86 NetBSD), and others will be more difficult |
| 78 | (HP, AIX). |
| 79 | |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 80 | <h2>How to get it</h2> |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 81 | |
jsm | bfb73f0 | 1998-11-30 10:44:55 +0000 | [diff] [blame] | 82 | You can download the latest version from <a href="ftp://ftp.cygnus.com/pub/green/">ftp.cygnus.com:/pub/green/</a>. |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 83 | |
| 84 | <p> |
| 85 | |
| 86 | You can also check out the very latest version via anonymous cvs. |
| 87 | Here's how: |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 88 | <pre> |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 89 | cvs -d :pserver:anoncvs@sourceware.cygnus.com:/cvs/libffi login |
| 90 | (password is ``anoncvs'') |
| 91 | cvs -d :pserver:anoncvs@sourceware.cygnus.com:/cvs/libffi co libffi |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 92 | </pre> |
| 93 | |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 94 | 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] | 95 | |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 96 | <p> |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 97 | |
| 98 | You can also <a |
| 99 | href="http://sourceware.cygnus.com/cgi-bin/cvsweb.cgi/libffi/?cvsroot=libffi"> |
| 100 | view the cvs archive</a> via cvsweb. |
| 101 | |
| 102 | <h2>Mailing lists</h2> |
| 103 | |
| 104 | For such a small piece of software, there are plenty of mailing lists |
| 105 | available. |
| 106 | |
| 107 | <ul> |
| 108 | <li><tt>libffi-announce</tt> is a low volume mailing list for libffi release announcements |
| 109 | <li><tt>libffi-discuss</tt> is a mailing list for asking questions, reporting bugs, etc. |
| 110 | </ul> |
| 111 | |
| 112 | <p>To subscribe to the <code>libffi-announce</code> mailing list, enter your |
| 113 | e-mail address: |
jsm | bfb73f0 | 1998-11-30 10:44:55 +0000 | [diff] [blame] | 114 | <form method="get" action="/cgi-bin/subscribe"> |
| 115 | <input type="hidden" name="listname" value="libffi-announce"> |
| 116 | <input type="text" name="username" size="16"> <input type="Submit" name="submi |
| 117 | t" value="Sign me up!"> |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 118 | </form> |
| 119 | |
| 120 | <br>To subscribe to the <code>libffi-discuss</code> mailing list, enter your |
| 121 | e-mail address: |
jsm | bfb73f0 | 1998-11-30 10:44:55 +0000 | [diff] [blame] | 122 | <form method="get" action="/cgi-bin/subscribe"> |
| 123 | <input type="hidden" name="listname" value="libffi-discuss"> |
| 124 | <input type="text" name="username" size="16"> <input type="Submit" name="submi |
| 125 | t" value="Sign me up!"> |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 126 | </form> |
| 127 | |
| 128 | <p> |
| 129 | |
| 130 | <h2>Authors and Credits</h2> |
| 131 | |
jsm | bfb73f0 | 1998-11-30 10:44:55 +0000 | [diff] [blame] | 132 | Libffi was written by <a href="http://www.cygnus.com/~green/"><b>Anthony Green</b></a>. |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 133 | |
| 134 | <ul> |
| 135 | <li> Portions of libffi were derived from <b>Gianni Mariani</b>'s free gencall |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 136 | library for Silicon Graphics machines. |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 137 | <li> The sparc port was derived from code contributed by the fine folks at |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 138 | <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>. |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 139 | <li>The Alpha port was written by <b>Richard Henderson</b> at Cygnus Solutions. |
| 140 | <li><b>Andreas Schwab</b> ported libffi to m68k Linux and provided a number of |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 141 | bug fixes. |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 142 | <li><b>Geoffrey Keating</b> ported libffi to the PowerPC. |
| 143 | <li><b>Raffaele Sena</b> ported libffi to the ARM. |
| 144 | <li><b>Jesper Skov</b> and <b>Andrew Haley</b> both did more than their fair share of |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 145 | stepping through the code and tracking down bugs. |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 146 | <li> |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 147 | Thanks to <b>Tom Tromey</b> for bug fixes and configuration help. |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 148 | <li> |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 149 | Thanks also to <b>Jim Blandy</b>, who provided some useful feedback on the libffi |
| 150 | interface. |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 151 | </ul> |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 152 | <p> |
| 153 | If you have a problem, or have found a bug, please send a note to |
green | af8b7f0 | 1998-11-30 06:20:05 +0000 | [diff] [blame] | 154 | <a href="mailto:libffi-discuss@cygnus.com">libffi-discuss@cygnus.com</a> or |
| 155 | to me directly (<a href="mailto:green@cygnus.com">green@cygnus.com</a>). |
green | 334f0b0 | 1998-11-29 16:56:12 +0000 | [diff] [blame] | 156 | |
| 157 | </body> |
| 158 | </html> |