forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

-G0 option

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
gauri



Joined: 20 Jan 2008
Posts: 35
Location: Belarus

PostPosted: Mon Mar 10, 2008 7:47 am    Post subject: -G0 option Reply with quote

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
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Mon Mar 10, 2008 9:31 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group