PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
elf-loader.h File Reference

Go to the source code of this file.

Functions

int LoadELFFromFile (const char *filename, int argc, char *argv[])
 
int LoadELFFromFileWithPartition (const char *filename, const char *partition, int argc, char *argv[])
 

Detailed Description

ELF Loader functions.

Definition in file elf-loader.h.

Function Documentation

◆ LoadELFFromFile()

int LoadELFFromFile ( const char *  filename,
int  argc,
char *  argv[] 
)

Definition at line 104 of file elf.c.

◆ LoadELFFromFileWithPartition()

int LoadELFFromFileWithPartition ( const char *  filename,
const char *  partition,
int  argc,
char *  argv[] 
)

Modify argv[0] when partition info should be kept

Parameters
filenamepath to the file itself
partitionblock device + partition name
argcNumber of arguments.
argvPointer to array of arguments.
Returns
positive on success, zero value on failure

You should prepare filename and partition before parsing in function

filename should be changed to <fs_type>:/path_to_file_without_mountpoint for example pfs3:/TEST.ELF (where pfs3 is mountpoint name) will become pfs:/TEST.ELF (where pfs - filesystem type)

partition should be in form <block_device><partition_name>: for example hdd0:__common: block_device - can be hdd0:, hdd1: , dvr_hdd0: <partition_name> - name of APA partition on particular block device dont forget about leading ":"

It is not necessary that filename should be on that partition filename - mass:/TEST.ELF partition - pfs:/__common will be valid usage

Definition at line 53 of file elf.c.