Closed doragasu closed 8 years ago
Interesting, no idea why this would be inconsistent. I'll try to reproduce. What is your build environment? OS, gcc version?
I recall as well that certain changes to sgdk broke most of my 3d examples due to changing the number of allowed vertices per polygons, so this may have nothing to do with linker issues.
Okay I think the deal is that the old 3d_example code has an old version of boot/sega.s. By copying the newer one in the sgdk/skeleton directory, I think this fixes the 'main' before rom header issue. I'll update the examples and try to clean a few things up.
3D examples are working now, thanks!
I have been trying to build some projects: some of them build nicely, others (including the 3d_examples) build but the generated ROM does not work. I have been tracing the problem, and it's because sometimes the
main()
function included inside.text.startup
section is placed on the ROM before the startup code (exception vectors and ROM header). Other times the sequence is correct: vectors+ROM header and then themain()
function code in.text.startup
.Unfortunately I don't know what triggers the wrong behaviour and how to fix the it... The same makefile is used on proyects that build and that doesn't, the link step invocation is the same (boot, archives, objects, libraries). Why does this sometimes fail? Could it be fixed maybe by modifying the linker files (.ld files)?