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<H2>C Specification</H2> 13<DL> 14 <DD> 15<PRE><CODE>#include <revolution/os.h></CODE></PRE> 16 <DD> 17<PRE>BOOL OSLink ( OSModuleInfo* newModule, void* bss ); 18 19BOOL OSLinkFixed ( OSModuleInfo* newModule, void* bss );</PRE> 20</DL> 21<H2>Arguments</H2> 22<TABLE border="1" cellpadding="3" cellspacing="0.1"> 23 <TBODY> 24 <TR> 25<TD width="120" bgcolor="#ffffe8"><I><B><CODE><STRONG><EM><CODE>newModule</CODE></EM></STRONG></CODE></B></I></TD> 26<TD width="520">Pointer to the module to link. </TD> 27 </TR> 28 <TR> 29<TD width="120" bgcolor="#ffffe8"><I><B><CODE><STRONG><EM><CODE>bss</CODE></EM></STRONG></CODE></B></I></TD> 30<TD width="520">Pointer to the available memory space to use for the bss section (size specified by <CODE>OSModuleHeader.bssSize</CODE>). </TD> 31 </TR> 32 </TBODY> 33</TABLE> 34<H2>Return Values</H2> 35<P>Returns <CODE>TRUE</CODE> if the function completes normally. </P> 36<H2>Description</H2> 37<P>The <code>OSLink</code> function links the specified module. Even after the module is unlinked, if the module startup code explicitly initializes its data section, the module memory copy can be reused by the <code>OSLink</code> function.</P> 38<P>The <code>OSLinkFixed</code> function links the specified module and releases some memory that the relocatable module occupies. Once the module is linked using the <a href="OSLink.html"><code>OSLinkFixed</code></a> function and the memory space is specified using <CODE>fixSize</CODE> of the <CODE>OSModuleHeader</CODE> structure, the memory space can be used for any purpose (for example, bss section). However, the module memory copy can't be reused with the <code>OSLink[Fixed]</code> function even after it is unlinked. When the module is linked, note that the location specified by <code>fixSize</code> is converted into the virtual address from the file offset. </P> 39 40<H2>See Also</H2> 41<P><a href="intro.html">Introduction to Relocatable Module System</a><br> <a href="OSUnlink.html"><code>OSUnlink</code></a></P> 42<H2>Revision History</H2> 43<P>03/01/2006 Initial version.</P> 44</BODY> 45</HTML>