PSPSDK 1.0+beta2
Loading...
Searching...
No Matches
psploadcore.h
Go to the documentation of this file.
1/*
2 * PSP Software Development Kit - https://github.com/pspdev
3 * -----------------------------------------------------------------------
4 * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5 *
6 * psploadcore.h - Interface to LoadCoreForKernel.
7 *
8 * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
9 * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
10 * Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
11 *
12 */
14#ifndef PSPLOADCORE_H
15#define PSPLOADCORE_H
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30typedef struct SceModule {
31 struct SceModule *next;
32 unsigned short attribute;
33 unsigned char version[2];
34 char modname[27];
36 unsigned int unknown1;
37 unsigned int unknown2;
39 unsigned int unknown3[4];
40 void * ent_top;
41 unsigned int ent_size;
42 void * stub_top;
43 unsigned int stub_size;
44 unsigned int unknown4[4];
45 unsigned int entry_addr;
46 unsigned int gp_value;
47 unsigned int text_addr;
48 unsigned int text_size;
49 unsigned int data_size;
50 unsigned int bss_size;
51 unsigned int nsegment;
52 unsigned int segmentaddr[4];
53 unsigned int segmentsize[4];
55
58typedef struct SceLibraryEntryTable {
60 const char * libname;
62 unsigned char version[2];
64 unsigned short attribute;
66 unsigned char len;
68 unsigned char vstubcount;
70 unsigned short stubcount;
73 void * entrytable;
75
78typedef struct SceLibraryStubTable {
79 /* The name of the library we're importing from. */
80 const char * libname;
82 unsigned char version[2];
83 /* Import attributes. */
84 unsigned short attribute;
86 unsigned char len;
88 unsigned char vstubcount;
90 unsigned short stubcount;
92 unsigned int * nidtable;
94 void * stubtable;
96 void * vstubtable;
98
99
108
117
126
133
138
141#ifdef __cplusplus
142}
143#endif
144
145#endif /* PSPLOADCORE_H */
void sceKernelIcacheClearAll(void)
Invalidate the CPU's instruction cache.
SceModule * sceKernelFindModuleByName(const char *modname)
Find a module by it's name.
SceModule * sceKernelFindModuleByAddress(unsigned int addr)
Find a module from an address.
int sceKernelModuleCount(void)
Return the count of loaded modules.
SceModule * sceKernelFindModuleByUID(SceUID modid)
Find a module by it's UID.
struct sockaddr_in __attribute__
int SceUID
UIDs are used to describe many different kernel objects.
Definition pspkerneltypes.h:24
char modname[27]
Definition psploadcore.h:3
SceUID modid
Definition psploadcore.h:7
float x
Definition psptypes.h:0
Defines a library and its exported functions and variables.
Definition psploadcore.h:58
unsigned short attribute
Library attributes.
Definition psploadcore.h:64
void * entrytable
Pointer to the entry table; an array of NIDs followed by pointers to functions and variables.
Definition psploadcore.h:73
unsigned char vstubcount
The number of variables exported by the library.
Definition psploadcore.h:68
unsigned short stubcount
The number of functions exported by the library.
Definition psploadcore.h:70
unsigned char version[2]
Library version.
Definition psploadcore.h:62
unsigned char len
Length of this entry table in 32-bit WORDs.
Definition psploadcore.h:66
const char * libname
The library's name.
Definition psploadcore.h:60
Specifies a library and a set of imports from that library.
Definition psploadcore.h:78
unsigned char version[2]
Minimum required version of the library we want to import.
Definition psploadcore.h:82
const char * libname
Definition psploadcore.h:80
unsigned short stubcount
The number of functions imported from the library.
Definition psploadcore.h:90
void * vstubtable
Pointer to the imported variable stubs.
Definition psploadcore.h:96
unsigned short attribute
Definition psploadcore.h:84
unsigned char len
Length of this stub table in 32-bit WORDs.
Definition psploadcore.h:86
unsigned int * nidtable
Pointer to an array of NIDs.
Definition psploadcore.h:92
void * stubtable
Pointer to the imported function stubs.
Definition psploadcore.h:94
unsigned char vstubcount
The number of variables imported from the library.
Definition psploadcore.h:88
Describes a module.
Definition psploadcore.h:30
unsigned int unknown1
Definition psploadcore.h:36
unsigned int unknown4[4]
Definition psploadcore.h:44
unsigned short attribute
Definition psploadcore.h:32
char terminal
Definition psploadcore.h:35
SceUID modid
Definition psploadcore.h:38
unsigned int segmentaddr[4]
Definition psploadcore.h:52
unsigned int text_size
Definition psploadcore.h:48
char modname[27]
Definition psploadcore.h:34
unsigned int data_size
Definition psploadcore.h:49
unsigned int ent_size
Definition psploadcore.h:41
void * stub_top
Definition psploadcore.h:42
unsigned int entry_addr
Definition psploadcore.h:45
unsigned int bss_size
Definition psploadcore.h:50
unsigned int stub_size
Definition psploadcore.h:43
unsigned int unknown2
Definition psploadcore.h:37
unsigned char version[2]
Definition psploadcore.h:33
unsigned int gp_value
Definition psploadcore.h:46
unsigned int nsegment
Definition psploadcore.h:51
struct SceModule * next
Definition psploadcore.h:31
unsigned int unknown3[4]
Definition psploadcore.h:39
unsigned int segmentsize[4]
Definition psploadcore.h:53
void * ent_top
Definition psploadcore.h:40
unsigned int text_addr
Definition psploadcore.h:47