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="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<TITLE>EL_Link*Ex</TITLE>
8<LINK rel="stylesheet" href="../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">EL_Link*Ex <img src="../image/TWL.gif" align="middle"></H1>
12<H2>Syntax</H2>
13<DL>
14  <DD>
15<CODE>#include &lt;twl/el.h&gt;</CODE><BR> <BR> <CODE>ELDlld EL_LinkEx( <A href="ELReadImage.html">ELReadImage</A> readfunc, u32 len, void* buf, u32 buf_size );</CODE><br> <CODE>ELDlld EL_LinkFileEx( const char* FilePath, void* buf, u32 buf_size );</CODE><br> <CODE>ELDlld EL_LinkImageEx( void* obj_image, u32 obj_len, void* buf, u32 buf_size );</CODE>
16  </DD>
17</DL>
18<H2>Arguments</H2>
19<TABLE border="1" width="100%">
20  <TBODY>
21    <TR>
22<TD><EM><STRONG>readfunc</STRONG></EM></TD>
23<TD>Developer-specific READ function.</TD>
24    </TR>
25    <TR>
26<TD><EM><STRONG>FilePath</STRONG></EM></TD>
27<TD>Path name of the dynamic module to register.</TD>
28    </TR>
29    <TR>
30<TD><EM><STRONG>obj_image</STRONG></EM></TD>
31<TD>Memory address of the dynamic module to register.</TD>
32    </TR>
33    <TR>
34<TD><EM><STRONG>len / obj_len</STRONG></EM></TD>
35<TD>Size of the dynamic module to register.</TD>
36    </TR>
37    <TR>
38<TD><EM><STRONG>buf</STRONG></EM></TD>
39<TD>Buffer in which the dynamic module will be registered.</TD>
40    </TR>
41    <TR>
42<TD><EM><STRONG>buf_size</STRONG></EM></TD>
43<TD>Size of buffer in which the dynamic module will be registered.</TD>
44    </TR>
45  </TBODY>
46</TABLE>
47
48<H2>Return Values</H2>
49<P>
50Returns the registered dynamic module when registration succeeded.<BR>Returns 0 when registration failed.
51</P>
52
53<H2>Description</H2>
54<P>
55Registers a dynamic module with the EL library.<BR><BR> The <code>EL_LinkEx</code> function loads the dynamic module using a READ function specified by the user. The <code>EL_LinkFileEx</code> function loads the dynamic module to register from ROM. The <code>EL_LinkImageEx</code> function uses a dynamic module that has already been loaded into memory.<BR><BR>You must secure a region for <SPAN class="argument">buf</SPAN> of at least the size determined by the <a href="EL_CalcEnoughBufferSizeforLink.html"><CODE>EL_CalcEnoughBufferSizeforLink*</CODE></a> functions.<br>If the size specified in <SPAN class="argument">buf_size</SPAN> is insufficient, the linking process fails partway through. Then, when you call the <a href="EL_GetResultCode.html"><CODE>EL_GetResultCode</CODE></a> function, <code>EL_RESULT_NO_MORE_RESOURCE</code> is returned.<br><br>Also note that because <SPAN class="argument">buf</SPAN> is where the dynamic module is registered, if you use the <code>EL_LinkImageEx</code> function to register the dynamic module, you temporarily need an additional buffer (<SPAN class="argument">obj_image</SPAN>) equal in size to the dynamic module (ELF file).<BR>
56<P><FONT color=red><B>Note:</B></FONT><BR> You can use a debugger to debug the dynamic module only if the <code>EL_LinkFileEx</code> function has been used.
57</P>
58
59<H2>See Also</H2>
60<P>
61<A href="EL_CalcEnoughBufferSizeforLink.html"><CODE>EL_CalcEnoughBufferSizeforLink*</CODE></A><BR> <A href="ELReadImage.html"><CODE>ELReadImage</CODE></A>
62</P>
63
64<H2>Revision History</H2>
65<P>
662009/03/16 Initial version.</P>
67<hr><p>CONFIDENTIAL</p></body>
68</HTML>
69