1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="Microsoft FrontPage 5.0">
6<META http-equiv="Content-Style-Type" content="text/css">
7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
8<TITLE>OSLink</TITLE>
9</HEAD>
10<BODY>
11<H1>OSLink</H1>
12
13<H2>Syntax</H2>
14<dl><dd><pre class="construction">
15#include &lt;revolution/os.h&gt;
16
17BOOL OSLink(OSModuleInfo* newModule, void* bss);
18
19BOOL OSLinkFixed(OSModuleInfo* newModule, void* bss);
20</pre></dd></dl>
21
22<H2>Arguments</H2>
23<TABLE class="arguments" border="1" >
24  <TBODY>
25    <TR>
26<TH>newModule</TH>
27<TD>Pointer to the module to be linked.</TD>
28    </TR>
29    <TR>
30<TH>bss</TH>
31<TD>Pointer to the available memory space used for the bss section (size given by <CODE>OSModuleHeader.bssSize</CODE>).</TD>
32    </TR>
33  </TBODY>
34</TABLE>
35
36<H2>Return Values</H2>
37<P>Returns <CODE>TRUE</CODE> for normal termination.</P>
38
39<H2>Description</H2>
40<P><CODE>OSLink</CODE> links the specified module. The memory copy of the module can be reused with <CODE>OSLink</CODE> even after the module is unlinked if the module startup code initializes its data section explicitly.</P>
41<P><CODE>OSLinkFixed</CODE> links the specified module and releases some memory occupied by the relocatable module. Once the module is linked with <CODE>OSLinkFixed</CODE>, the later memory space specified by <CODE>fixSize</CODE> of the <CODE>OSModuleHeader</CODE> structure can be used for any purpose (for example, for the bss section). The memory copy of the module, however, cannot be reused with <CODE>OSLink[Fixed]</CODE> even after it is unlinked. Be aware that the position specified by <CODE>fixSize</CODE> is converted to a virtual address from a file offset when the module is linked.</P>
42
43<H2>See Also</H2>
44<P class="reference">
45<A href="intro.html">Relocatable Module System</A>, <A href="OSUnlink.html">OSUnlink</A>
46</P>
47
48<H2>Revision History</H2>
49<P>
502006/03/01 Initial version.<br>
51</P>
52
53<hr><p>CONFIDENTIAL</p></body>
54</HTML>