psp-fixup-imports.c File Reference
#include <stdio.h>
#include <getopt.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include "types.h"
#include "elftypes.h"
#include "prxtypes.h"
#include "sha1.h"
Include dependency graph for psp-fixup-imports.c:

Data Structures

struct  NidMap
struct  ImportMap


#define PRX_LIBSTUB_SECT   ".lib.stub"
#define PRX_STUBTEXT_SECT   ".sceStub.text"
#define PRX_NID_SECT   ".rodata.sceNid"
#define MAX_MAPNIDS   1024
#define MIPS_JR_31   0x03e00008
#define MIPS_NOP   0x0


int process_args (int argc, char **argv)
void print_help (void)
const unsigned char * find_data (unsigned int iAddr)
struct ImportMapfind_map_by_name (const char *name)
unsigned char * load_file (const char *file, unsigned int *size)
int validate_header (unsigned char *data)
int load_sections (unsigned char *data)
int load_elf (const char *elf)
void free_data (void)
void strip_wsp (char *str)
int load_mapfile (const char *mapfile)
int fixup_imports (void)
int fixup_nidmap (void)
int main (int argc, char **argv)

Macro Definition Documentation

#define MAX_MAPNIDS   1024

Referenced by load_mapfile().

#define MIPS_JR_31   0x03e00008

Referenced by fixup_imports().

#define MIPS_NOP   0x0

Referenced by fixup_imports().

#define PRX_LIBSTUB_SECT   ".lib.stub"

Referenced by load_sections().

#define PRX_NID_SECT   ".rodata.sceNid"

Referenced by load_sections().

#define PRX_STUBTEXT_SECT   ".sceStub.text"

Referenced by load_sections().

Function Documentation

const unsigned char* find_data ( unsigned int  iAddr)
struct ImportMap* find_map_by_name ( const char *  name)

References ImportMap::name, ImportMap::next, and strcmp().

Referenced by fixup_nidmap().

void free_data ( void  )

References free(), and NULL.

Referenced by main().

int load_elf ( const char *  elf)

References load_file(), load_sections(), NULL, and validate_header().

Referenced by main().

unsigned char* load_file ( const char *  file,
unsigned int *  size 
void print_help ( void  )

References fprintf(), and stderr.

int process_args ( int  argc,
char **  argv 
void strip_wsp ( char *  str)

References isspace(), memmove(), and strlen().

Referenced by load_mapfile().