TyRaNiD wrote:Yah minifire does go the whole hog, no C what so ever, if you use main at all then you are including C in the crt0 (which is the entry point) and newlib, not that that perhaps worries you :) If you are just interested in your code being asm then just put your code into a main.s file, then in the standard Makefile add main.o as an object and the build system worries about doing the rest.
Of course you _may_ want to add a jr $ra; nop; to that bit of asm else it is, not will crash in an unexpected way depending what code is after that bit of asm :P
I know I'm grave-digging a REALLY old post here, but Tyranid, is what you have in the minifire archive what your compiler actually gave you after compiling that source or did you edit the ELF files to compact them?
When I compile that source, I get this:
Code: Select all
Start of program headers: 52 (bytes into file)
Start of section headers: 4940 (bytes into file)
Flags: 0x10a23001, noreorder, unknown CPU, eabi32, mips2
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 1
Size of section headers: 40 (bytes)
Number of section headers: 8
Section header string table index: 7
Notice the offset of the section headers, almost 5k in the file (the majority of the file is filled with 00's before it actually gets to the program data)
Whereas yours is:
Code: Select all
Start of program headers: 60 (bytes into file)
Start of section headers: 52 (bytes into file)
Flags: 0x10a23001, noreorder, unknown CPU, eabi32, mips2
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 1
Size of section headers: 40 (bytes)
Number of section headers: 3
Section header string table index: 2
With a total filesize of 671 bytes.
Is there something I'm missing to compile it like this? or did you edit the file contents and offsets manually? :)