problem loading elfs

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
JorDy
Posts: 121
Joined: Sun Dec 11, 2005 8:45 am

problem loading elfs

Post 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]
Mega Man
Posts: 260
Joined: Sat Jun 18, 2005 3:14 am
Contact:

Post 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.
JorDy
Posts: 121
Joined: Sun Dec 11, 2005 8:45 am

Post 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
misfire
Posts: 110
Joined: Mon Sep 06, 2004 7:53 am
Location: Germany

Re: problem loading elfs

Post 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.
Post Reply