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*</TITLE> 8<LINK rel="stylesheet" href="../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">EL_Link* <img src="../image/TWL.gif" align="middle"></H1> 12<H2>Syntax</H2> 13<DL> 14 <DD> 15<CODE>#include <twl/el.h></CODE><BR> <BR> <CODE>ELDlld EL_Link( <A href="ELReadImage.html">ELReadImage</A> readfunc, u32 len, void* buf );</CODE><br> <CODE>ELDlld EL_LinkFile( const char* FilePath, void* buf);</CODE><br> <CODE>ELDlld EL_LinkImage( void* obj_image, u32 obj_len, void* buf );</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 </TBODY> 42</TABLE> 43 44<H2>Return Values</H2> 45<P> 46Returns the registered dynamic module when registration succeeded.<BR>Returns 0 when registration failed. 47</P> 48 49<H2>Description</H2> 50<P> 51Registers a dynamic module with the EL library.<BR><BR> The <code>EL_Link</code> function loads the dynamic module using the read function specified by the developer. The <code>EL_LinkFile</code> function loads the dynamic module to be registered from ROM. The <code>EL_LinkImage</code> function uses a dynamic module that has 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><br> Also note that because <SPAN class="argument">buf</SPAN> is where the dynamic module is registered, if you use the <code>EL_LinkImage</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> 52<P><FONT color=red><B>Note:</B></FONT><BR> You can use a debugger to debug the dynamic module only if the <code>EL_LinkFile</code> function has been used. Normally, do not use this function (<CODE>EL_Link</CODE>). Use one of the <a href="EL_LinkEx.html"><CODE>EL_Link*Ex</CODE></a> functions. 53</P> 54 55<H2>See Also</H2> 56<P><A href="EL_LinkEx.html"><CODE>EL_Link*Ex</CODE></A><BR> <A href="EL_CalcEnoughBufferSizeforLink.html"><CODE>EL_CalcEnoughBufferSizeforLink*</CODE></A><BR> <A href="ELReadImage.html"><CODE>ELReadImage</CODE></A></P> 57<H2>Revision History</H2> 58<P> 592009/03/16 Added recommendation to use the <code>EL_Link*Ex</code> functions. <br> 2009/01/30 Changed the explanation about the size secured for <SPAN class="argument">buf</SPAN>.<BR> 2008/10/02 Added a description about the size secured for <SPAN class="argument">buf</SPAN>.<BR> 2008/04/22 Added mention of debuggers.<BR> 2008/04/14 Changed the specification for <CODE>EL_LinkFile</CODE>.<BR> 2007/08/21 Initial version.</P> 60<hr><p>CONFIDENTIAL</p></body> 61</HTML> 62