<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>On 2011-12-11 22:57, ik wrote:</tt>
<blockquote
cite="mid:CAOccsKCDMnguW0d9Txqm8eu=rC0bPPN35giRb0xEUKQozCGtYg@mail.gmail.com"
type="cite">
<div dir="ltr"><tt>On Sun, Dec 11, 2011 at 23:35, Torsten Bonde
Christiansen <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:tc@epidata.dk">tc@epidata.dk</a>></span>
wrote:<br>
</tt>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> <tt>Hi.<br>
<br>
I'm trying to create a shared library (under linux) and
I not sure what the<br>
difference between the modifier <b>export</b> and the
section <b>exports</b> is? Or perhaps<br>
when to use one and the other...<br>
</tt></div>
</blockquote>
<div><tt><br>
export means that you can control the name of a symbol in
how it will be in the elf file itself of the so.<br>
So you call your original procedure Foo, but you export it
as 'baz', so using objdump in Linux, you'll find "baz" and
not "Foo".<br>
<br>
Exports, is the way to tell the compiler what are the
symbols you wish to make available for reuse in the so
file itself, so I could bind to them.</tt>
<tt><br>
</tt></div>
</div>
</div>
</blockquote>
<tt>So in the following example "foo" would not be visible (neither
as "foo" nor "bar") to other program (eg. a C-program) unless I
added an <b>exports</b> section?<br>
<br>
library test;<br>
<br>
function foo(a: integer): integer; [export, alias: 'bar'];<br>
begin<br>
result := a * a;<br>
end;<br>
<br>
end.<br>
<br>
<br>
Basically what i'm trying to do, is use a lot of units and I want
avoid creating a HUGE <b>exports</b> section but rather name the<br>
methods in the units instead.<br>
<br>
Regards,<br>
Torsten Bonde Christiansen.<br>
<br>
</tt><tt><br>
</tt>
</body>
</html>