-G0 option
-G0 option
What is the reason for -G0 to be used? It seems that without this option the programs compile to much smaller code.
Freelance game industry veteran. 8]
The decision of which variables to put in the GP-relative small data section happens at compile time. When you link multiple object files, on larger projects with MIPS you often find that there were too many of them, and the linker can't do anything about it at that point (gives GPREL relocation errors). So compiling with -G0 is usually done to just avoid those kinds of problems. If you can increase the value without triggering errors then yeah, that's good.