EL_Link*

Syntax

#include <twl/el.h>

ELDlld EL_Link( ELReadImage readfunc, u32 len, void* buf );
ELDlld EL_LinkFile( const char* FilePath, void* buf);
ELDlld EL_LinkImage( void* obj_image, u32 obj_len, void* buf );

Arguments

readfunc Developer-specific READ function.
FilePath Path name of the dynamic module to register.
obj_image Memory address of the dynamic module to register.
len / obj_len Size of the dynamic module to register.
buf Buffer in which the dynamic module will be registered.

Return Values

Returns the registered dynamic module when registration succeeded.
Returns 0 when registration failed.

Description

Registers a dynamic module with the EL library.

The EL_Link function loads the dynamic module using the read function specified by the developer. The EL_LinkFile function loads the dynamic module to be registered from ROM. The EL_LinkImage function uses a dynamic module that has been loaded into memory.

You must secure a region for buf of at least the size determined by the EL_CalcEnoughBufferSizeforLink* functions.

Also note that because buf is where the dynamic module is registered, if you use the EL_LinkImage function to register the dynamic module, you temporarily need an additional buffer (obj_image) equal in size to the dynamic module (ELF file).

Note:
You can use a debugger to debug the dynamic module only if the EL_LinkFile function has been used. Normally, do not use this function (EL_Link). Use one of the EL_Link*Ex functions.

See Also

EL_Link*Ex
EL_CalcEnoughBufferSizeforLink*
ELReadImage

Revision History

2009/03/16 Added recommendation to use the EL_Link*Ex functions.
2009/01/30 Changed the explanation about the size secured for buf.
2008/10/02 Added a description about the size secured for buf.
2008/04/22 Added mention of debuggers.
2008/04/14 Changed the specification for EL_LinkFile.
2007/08/21 Initial version.


CONFIDENTIAL