pspsdk-1.0+beta2
prxtypes.h
Go to the documentation of this file.
1 /*
2  * PSP Software Development Kit - http://www.pspdev.org
3  * -----------------------------------------------------------------------
4  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5  *
6  * prxtypes.h - Definition of PRX specific types.
7  *
8  * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
9  *
10  * $Id: prxtypes.h 1095 2005-09-27 21:02:16Z jim $
11  */
12 
13 #ifndef __PRXTYPES_H__
14 #define __PRXTYPES_H__
15 
16 #include "types.h"
17 
18 #define PSP_MODULE_MAX_NAME 28
19 #define PSP_LIB_MAX_NAME 128
20 #define PSP_ENTRY_MAX_NAME 128
21 /* Define the maximum number of permitted entries per lib */
22 #define PSP_MAX_V_ENTRIES 255
23 #define PSP_MAX_F_ENTRIES 65535
24 
25 #define PSP_MODULE_INFO_NAME ".rodata.sceModuleInfo"
26 
27 /* Remove the .rel.sceStub.text section as it shouldn't have been there */
28 #define PSP_MODULE_REMOVE_REL ".rel.sceStub.text"
29 
30 /* Define a name for the unnamed first export */
31 #define PSP_SYSTEM_EXPORT "syslib"
32 
34 {
37 };
38 
39 /* Define the in-prx structure types */
40 
41 /* Structure to hold the module export information */
42 struct PspModuleExport
43 {
45  u32 flags;
48 } __attribute__((packed));
49 
50 /* Structure to hold the module import information */
52 {
60 };
61 
62 /* Structure to hold the module info */
64 {
72 };
73 
74 /* Define the loaded prx types */
75 struct PspEntry
76 {
77  /* Name of the entry */
79  /* Nid of the entry */
81  /* Type of the entry */
83  /* Virtual address of the entry in the loaded elf */
85  /* Virtual address of the nid dword */
87 };
88 
89 /* Holds a linking entry for an import library */
91 {
93  struct PspLibImport *prev;
95  struct PspLibImport *next;
98  /* Virtual address of the lib import stub */
100  /* Copy of the import stub (in native byte order) */
102  /* List of function entries */
104  /* Number of function entries */
105  int f_count;
106  /* List of variable entried */
108  /* Number of variable entires */
109  int v_count;
110 };
111 
112 /* Holds a linking entry for an export library */
114 {
128  int f_count;
132  int v_count;
133 };
134 
136 struct PspModule
137 {
148 };
149 
150 #endif