Page 1 of 1
ERL in ps2sdk - relocatable binaries.
Posted: Mon May 02, 2005 6:49 pm
by pixel
Hi there,
As some already may know, I've been working on some relocatable stuff for the SDK, that I named ERL. I got word that sony and sn made their own, called ERX, that's why I named mine ERL for Library, but it also works for binaries actually.
Now, I've been retaining my code since quite a time, because I want to try to put the most mature API as possible, in order to avoid changing API after release, and so to break eventual softwares which started to use the first API. I guess I should now ask people over here for a review of my work, so I post some of the docs I wrote, as well as some code snipplet.
Note that the current design inforces usage of a "erl-support.c" file within all libraries, beeing something like that:
Code: Select all
#include <erl.h>
char * erl_id = "hello";
char * erl_dependancies[] = {
"libc",
0
};
Files are at
http://nnoble.nerim.net/erl/
Comments utterly welcome (requested even :P)
Posted: Mon May 02, 2005 10:10 pm
by weltall
that's a very nice work, thanks pixel :)
Posted: Sun May 22, 2005 11:58 pm
by weltall
when are you going to release the remaining things? :)
i'm looking forward for it :))
Posted: Tue May 24, 2005 6:13 pm
by pixel
Well, I am currently quite far from home, with very limited Internet access, and for some time I am affraid...
Posted: Sun Jun 12, 2005 8:11 pm
by weltall
news? :)
Posted: Sun Jun 12, 2005 9:22 pm
by pixel
Okay... let's commit this. I still think it's more or less "not good", but, whatever: it's sleeping on my HDD since too long. Maybe it'll be useful for some people, and maybe they'll fix it if it's not correctly designed.
Don't hesitate to post comments, flames, feedback, questions etc...
Posted: Mon Jun 13, 2005 4:26 pm
by weltall
i was trying to compile the latest ps2sdk and i get these things: (i'm compiling with msys 1.0 and ee and iop gcc 3.2.2, the ps2sdk of two days ago was compiling without problems)
Code: Select all
/Administrator/PS2SDK/ee/libc/include -IC:/msys/1.0/home/Administrator/PS2SDK/ee /erl/include -Iinclude -DF___errno src/kernel.S -c -o obj/__errno.o
ee-gcc -D_EE -G0 -O2 -Wall -IC:/msys/1.0/home/Administrator/PS2SDK/ee/kernel/i nclude -IC:/msys/1.0/home/Administrator/PS2SDK/common/include -IC:/msys/1.0/home /Administrator/PS2SDK/ee/libc/include -IC:/msys/1.0/home/Administrator/PS2SDK/ee /erl/include -Iinclude -DF_errno src/kernel.S -c -o obj/errno.o
ee-gcc -D_EE -G0 -O2 -Wall -IC:/msys/1.0/home/Administrator/PS2SDK/ee/kernel/i nclude -IC:/msys/1.0/home/Administrator/PS2SDK/common/include -IC:/msys/1.0/home /Administrator/PS2SDK/ee/libc/include -IC:/msys/1.0/home/Administrator/PS2SDK/ee /erl/include -Iinclude -DF_strncpy src/kernel.S -c -o obj/strncpy.o
src/kernel.S: Assembler messages:
src/kernel.S:1102: Warning: Loop length is too short for r5900.
ee-gcc -D_EE -G0 -O2 -Wall -IC:/msys/1.0/home/Administrator/PS2SDK/ee/kernel/i nclude -IC:/msys/1.0/home/Administrator/PS2SDK/common/include -IC:/msys/1.0/home /Administrator/PS2SDK/ee/libc/include -IC:/msys/1.0/home/Administrator/PS2SDK/ee /erl/include -Iinclude -DF_strlen src/kernel.S -c -o obj/strlen.o
ee-gcc -D_EE -G0 -O2 -Wall -IC:/msys/1.0/home/Administrator/PS2SDK/ee/kernel/i nclude -IC:/msys/1.0/home/Administrator/PS2SDK/common/include -IC:/msys/1.0/home /Administrator/PS2SDK/ee/libc/include -IC:/msys/1.0/home/Administrator/PS2SDK/ee /erl/include -Iinclude -DF_memcpy src/kernel.S -c -o obj/memcpy.o
src/kernel.S: Assembler messages:
src/kernel.S:1239: Warning: Loop length is too short for r5900.
ee-gcc -D_EE -G0 -O2 -Wall -IC:/msys/1.0/home/Administrator/PS2SDK/ee/kernel/i nclude -IC:/msys/1.0/home/Administrator/PS2SDK/common/include -IC:/msys/1.0/home /Administrator/PS2SDK/ee/libc/include -IC:/msys/1.0/home/Administrator/PS2SDK/ee /erl/include -Iinclude -DF_memset src/kernel.S -c -o obj/memset.o
src/kernel.S: Assembler messages:
src/kernel.S:1352: Warning: Loop length is too short for r5900.
src/kernel.S:1380: Warning: Loop length is too short for r5900.
ee-gcc -D_EE -G0 -O2 -Wall -IC:/msys/1.0/home/Administrator/PS2SDK/ee/kernel/i nclude -IC:/msys/1.0/home/Administrator/PS2SDK/common/include -IC:/msys/1.0/home /Administrator/PS2SDK/ee/libc/include -IC:/msys/1.0/home/Administrator/PS2SDK/ee /erl/include -Iinclude -DF___syscall src/kernel.S -c -o obj/__syscall.o
src/kernel.S: Assembler messages:
src/kernel.S:60: Error: illegal operands `mfc0 $v0,$12'
src/kernel.S:61: Error: illegal operands `andi $v0,$v0,0x18'
src/kernel.S:62: Error: illegal operands `beqz $v0,_kMode'
src/kernel.S:68: Error: illegal operands `sll $v1,$v1,2'
src/kernel.S:69: Error: illegal operands `lui $k0,0x8000'
src/kernel.S:70: Error: illegal operands `lhu $v0,0x02F0($k0)'
src/kernel.S:71: Error: illegal operands `sll $v0,$v0,16'
src/kernel.S:72: Error: illegal operands `lh $k0,0x02F8($k0)'
src/kernel.S:73: Error: illegal operands `add $v0,$k0'
src/kernel.S:74: Error: illegal operands `addu $v1,$v0'
src/kernel.S:75: Error: illegal operands `lw $k0,0x00($v1)'
src/kernel.S:76: Error: illegal operands `jr $k0'
make[2]: *** [obj/__syscall.o] Error 1
make[2]: Leaving directory `/home/administrator/ps2sdk/ee/kernel'
make[1]: *** [all-kernel] Error 2
make[1]: Leaving directory `/home/administrator/ps2sdk/ee'
make: *** [all-ee] Error 2
Administrator@MAIN /home/administrator/ps2sdk
$
thanks in advance for help :)
Posted: Mon Jun 13, 2005 5:40 pm
by pixel
*sigh*
Yeah, I changed some small things into the syscall facility in the meanwhile, and used the new register naming scheme. Seems you're having an old patch there, which doesn't support register aliases.
Anyway, I've changed that to no-register-aliases. Update'n'test!
Ho, and, mh.... the erl-loader needs something to compile, and I don't know if it'll work from msys....
Look at ee/erl/src/build-exports.sh for details: you need grep, awk, and sort.
Posted: Mon Jun 13, 2005 11:13 pm
by weltall
ok thanks now it compiles, i also updated my toolchain thanks :)