| View previous topic :: View next topic |
| Author |
Message |
gauri
Joined: 20 Jan 2008 Posts: 35 Location: Belarus
|
Posted: Mon Mar 10, 2008 7:47 am Post subject: -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] |
|
| Back to top |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
Posted: Mon Mar 10, 2008 9:31 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
|