Page 1 of 1

problem loading elfs

Posted: Sat Nov 11, 2006 9:07 pm
by JorDy
I am trying to run an application in kernel memory so that it is not wiped. I have tried loading this at 0x000a0000 as well as many other locations, but each time i try to run it it fails on ps2link and freezes the PS2 or if i try and run it from memory card it returns the red error screen.

even trying to compile something like this it fails

Code: Select all

#include <tamtypes.h>
#include <stdio.h>
#include <kernel.h>
#include <sifrpc.h>

int main&#40;void&#41;
&#123;
        SifInitRpc&#40;0&#41;;

	printf&#40;"Welcome\n\n"&#41;;

	SifExitRpc&#40;&#41;;
	SleepThread&#40;&#41;;
	return 0;
&#125;
[/code]

Posted: Sun Nov 12, 2006 9:50 pm
by Mega Man
As far as I know ps2link is located at this area. There are two workarounds possible:

1. You need to recompile ps2link. There is an option to load it at a high memory address. It is possible to load the recompiled version of ps2link with ps2link itself.
2. Pack your application with sjcrunch or another application packer.

I've never seen a red error screen, i'm curious where this comes from.

Posted: Mon Nov 13, 2006 3:55 am
by JorDy
ive tried the sjcrunch method no luck :-/

and as for compiling ps2link too much hassle ive tried compiling this before just ran into error upon error.

dont know what else to do

Re: problem loading elfs

Posted: Tue Nov 14, 2006 9:27 pm
by misfire
JorDy wrote:I am trying to run an application in kernel memory so that it is not wiped. I have tried loading this at 0x000a0000 as well as many other locations, but each time i try to run it it fails on ps2link and freezes the PS2 or if i try and run it from memory card it returns the red error screen. [...]
FYI, 0x000A0000 doesn't belong to kernel memory. The kernel is located at 0x80000000 - 0x80080000 (in KSEG0) or 0xA0000000 - 0xA0080000 (in KSEG1), respectively.

The problem is that you seem to lack the basics of memory spaces and ELF loading.