Closed abrasive closed 3 years ago
Oh, hang on... the linker script starts with
OUTPUT_FORMAT(coff-sh)
...so what is the intended behaviour?
Coff format should not be used. So it's a mistake.It's elf :)
Easy then, I've updated the patch accordingly :)
My apologies - it really does need to link to coff-sh if you're using libsgl. I just spent some hours banging my head on a boot failure - it turns out that if you link directly to elf32-sh, then some of the relocations in libsgl are screwed up; for example the BlankIn
and BlankOut
interrupt handlers are relocated wrong at IMM_BlankIn
and IMM_BlankOut
, so it jumps into the middle of the handler and crashes...
However, if you link to coff-sh and then objcopy to elf32-sh, it works just fine.
The reason I'm interested in the game.elf
format is because I'm adding ELF loading support to the Satiator ODE so people can boot little apps more easily, and I'd like to make things as easy for Jo users as possible. How would you feel about a patch that adds an extra objcopy step to ensure the final game.elf
is actually an ELF?
I really appreciate what you do with the Satiator :) Don't hesitate to suggest a fix. I have no problem modifying the makefile or any part of the code if that makes it easier to use. The extra objcopy should solve this problem.
Hello! Here are some minor fixes relevant to Linux support:
include was not available in the Linux toolchain, and
game.elf
was actually a COFF file; the patch ensures it's ELF.