/usr/share/doc/libffi5/html/Introduction.html is in libffi-dev 3.0.10-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | <html lang="en">
<head>
<title>Introduction - libffi</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="libffi">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="index.html#Top" title="Top">
<link rel="next" href="Using-libffi.html#Using-libffi" title="Using libffi">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This manual is for Libffi, a portable foreign-function interface
library.
Copyright (C) 2008, 2010 Red Hat, Inc.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2, or
(at your option) any later version. A copy of the license is
included in the section entitled ``GNU General Public License''.
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="Introduction"></a>
<p>
Next: <a rel="next" accesskey="n" href="Using-libffi.html#Using-libffi">Using libffi</a>,
Previous: <a rel="previous" accesskey="p" href="index.html#Top">Top</a>,
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
<h2 class="chapter">1 What is libffi?</h2>
<p>Compilers for high level languages generate code that follow certain
conventions. These conventions are necessary, in part, for separate
compilation to work. One such convention is the <dfn>calling
convention</dfn>. The calling convention is a set of assumptions made by
the compiler about where function arguments will be found on entry to
a function. A calling convention also specifies where the return
value for a function is found. The calling convention is also
sometimes called the <dfn>ABI</dfn> or <dfn>Application Binary Interface</dfn>.
<a name="index-calling-convention-1"></a><a name="index-ABI-2"></a><a name="index-Application-Binary-Interface-3"></a>
Some programs may not know at the time of compilation what arguments
are to be passed to a function. For instance, an interpreter may be
told at run-time about the number and types of arguments used to call
a given function. ‘<samp><span class="samp">Libffi</span></samp>’ can be used in such programs to
provide a bridge from the interpreter program to compiled code.
<p>The ‘<samp><span class="samp">libffi</span></samp>’ library provides a portable, high level programming
interface to various calling conventions. This allows a programmer to
call any function specified by a call interface description at run
time.
<p><acronym>FFI</acronym> stands for Foreign Function Interface. A foreign
function interface is the popular name for the interface that allows
code written in one language to call code written in another language.
The ‘<samp><span class="samp">libffi</span></samp>’ library really only provides the lowest, machine
dependent layer of a fully featured foreign function interface. A
layer must exist above ‘<samp><span class="samp">libffi</span></samp>’ that handles type conversions for
values passed between the two languages.
<a name="index-FFI-4"></a><a name="index-Foreign-Function-Interface-5"></a>
</body></html>
|