Hello everybody! I and a friend is trying to add support in TinyCC for the dcpu[1, 2], we have gotten a little bit on the way and are able to emit function prologe and math arithmetics.
We are currently using "-Wl,-format=binary" and "-c" to get out binary data from it and have hacked in assembler output as well. When I try without the "-c" flag I see it trying to link to crt1.o and crti.o as well as a couple of standard libraries afterwards. I'm wondering if it is possible to only get it to link with only crt1.o and no standard library and then hack it to make _start be located at 0x0 as a way to just get something slightly more proper and that supports multiple C files? Without -Wl,-format=binary it also looks like its outputting i386-efl object file? I'm guessing here but it looks like I should be able to write a crt1.c[3] and compile that into a "i386-elf" and finally make the linker output a binary. I'm sorry if this email is a bit over the place. Thanks for any advice you can give. Cheers, Jakob. [1] http://0x10c.com/doc/dcpu-16.txt [2] http://0x10c.com [3] int main(int argc, char** argv); void _start() { // Stack starts in the correct place. // Setup arguments. char* argv[2] = { "<APP>", NULL, }; // main expects two arguments. main(1, &argv); // XXX Syscall to return result. } _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
