Huge obj file size with GCC3.2!

Andrew Haley aph@redhat.com
Wed Jul 19 16:16:00 GMT 2006


Olivier Langlois writes:

 > Yes, the the 2 other compilers are MW CodeWarrior and SN ProDG for
 > PS2.
 > 
 > After rereading your reply, I did check if I had a .bss section and
 > GCC does not generate one and the 2 other compilers do. That is
 > probably the reason why there is a 50MB difference between the
 > outputs. Thanks, you've shown me something I didn't know! Maybe it
 > has something to do with my compilation switches that I'm using
 > which are basically -O2 minus instruction scheduling related
 > switches as those were making the compiler freeze on some cpp files
 > of the project I'm working on:
 > 
 > -Wall -fno-common -fno-exceptions -O1 -fforce-mem
 > -foptimize-sibling-calls -fstrength-reduce -fcse-follow-jumps
 > -fcse-skip-blocks -frerun-cse-after-loop -frerun-loop-opt -fgcse
 > -fgcse-lm -fgcse-sm -fdelete-null-pointer-checks
 > -fexpensive-optimizations -fregmove -fcaller-saves -fpeephole2
 > -fstrict-aliasing -falign-functions -falign-jumps -falign-loops
 > -falign-labels
 > 
 > How someone can specify the compiler to generate a .bss section?
 > If I do not find a solution, I'll just dynamically allocate the array to
 > fix the problem but that would be cool to figure out the right way to do
 > it!

gcc generates BSS by default; this is either something specific to the
PS2 version of gcc, or it's a bug.

Andrew.



More information about the Gcc-help mailing list