PSP2SDK  dirty-f9e4f2d
The free SDK for PSP2
include/psp2/moduleinfo.h
Go to the documentation of this file.
00001 
00012 #ifndef _PSP2_MODULEINFO_H_
00013 #define _PSP2_MODULEINFO_H_
00014 
00015 #include <psp2/types.h>
00016 #include <stddef.h>
00017 #include <stdint.h>
00018 
00020 typedef struct {
00021     uint16_t attr;  
00022     uint16_t ver;   
00023     char name[27];  
00024     uint8_t type;   
00025     void *gp;   
00026     uint32_t expTop;    
00027     uint32_t expBtm;    
00028     uint32_t impTop;    
00029     uint32_t impBtm;    
00030     uint32_t nid;   
00031     uint32_t unk[3];    
00032     uint32_t start; 
00033     uint32_t stop;  
00034     uint32_t exidxTop;  
00035     uint32_t exidxBtm;  
00036     uint32_t extabTop;  
00037     uint32_t extabBtm;  
00038 } _sceModuleInfo;
00039 
00041 typedef const _sceModuleInfo SceModuleInfo;
00042 
00043 // It doesn't refer to import_btm because it is not defined yet.
00052 /* Declare a module.  This must be specified in the source of a library or executable. */
00053 #define _PSP2_MODULE_INFO_(attribute, version, module_name) \
00054     __asm__ (".section .sceLib.stub, \"a\", %progbits;");   \
00055     SceModuleInfo module_info   \
00056         __attribute__((section(".sceModuleInfo.rodata"), used)) \
00057             = { attribute, version, module_name };
00058 
00059 #ifdef __cplusplus
00060 #define PSP2_MODULE_INFO(attribute, version, module_name)   \
00061     extern "C" { _PSP2_MODULE_INFO_(attribute, version, module_name) }
00062 #else
00063 #define PSP2_MODULE_INFO _PSP2_MODULE_INFO_
00064 #endif
00065 
00066 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines