1 /*---------------------------------------------------------------------------*
2   Project:  TwlSDK - ELF Loader
3   File:     import.h
4 
5   Copyright 2006-2008 Nintendo. All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law. They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Date:: 2008-09-17#$
14   $Rev: 8556 $
15   $Author: okubata_ryoma $
16  *---------------------------------------------------------------------------*/
17 
18 #ifndef TWL_COMMON_IMPORT_H_
19 #define TWL_COMMON_IMPORT_H_
20 
21 #include <twl/el.h>
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /*------------------------------------------------------
28   This header file includes definitions used by the import library.
29 
30   In general, developers do not need to refer to this header file.
31 
32  -----------------------------------------------------*/
33 
34 typedef struct
35 {
36     void*       fp;
37     const char* fn;
38 } ELImportEntry;
39 
40 
41 #ifdef SDK_DEBUG
42 extern const char* ELi_LastFunctionName;
43 
ELi_SetLastFunctionName(const char * fn)44 SDK_INLINE void ELi_SetLastFunctionName(const char* fn)
45 {
46     ELi_LastFunctionName = fn;
47 }
48 #else
49 #define ELi_SetLastFunctionName(fn)   (void)(fn);
50 #endif
51 
52 void ELi_UnresolvedFunc(void);
53 void EL_LoadImportTable(ELDlld dlld, ELImportEntry entries[], u32 count);
54 void EL_UnloadImportTable(ELImportEntry entries[], u32 count);
55 
56 #ifdef __cplusplus
57 }    /* extern "C" */
58 #endif
59 
60 #endif    /*TWL_COMMON_IMPORT_H_*/
61