Bug#593655: gcc-snapshot: binaries get much larger then with 4.5
Package: gcc-snapshot
Version: 20100814-1
Hi,
I noticed that gcc-snapshot makes markedly larger binaries with -Os than
gcc-4.5 does (well, granted, there's a few other options in the mix); it
led me to ponder if this could be the issue:
fugl:~> cat test.c
void foo() {}
fugl:~> /usr/lib/gcc-snapshot/bin/gcc -c test.c
fugl:~> size test.o
text data bss dec hex filename
61 0 0 61 3d test.o
fugl:~> gcc-4.5 -c test.c
fugl:~> size test.o
text data bss dec hex filename
5 0 0 5 5 test.o
It seems gcc-snapshot unconditionally (even with -fno-exceptions) includes an
.eh_frame section. It doesn't seem to get stripped out on link either; the
problem persists:
fugl:~> cat test.c
int main(int argc, char **argv) { return 0; }
fugl:~> /usr/lib/gcc-snapshot/bin/gcc -Os -s -o test test.c
fugl:~> ls -l test
-rwxr-xr-x 1 sesse sesse 2916 2010-08-20 00:59 test
fugl:~> gcc-4.5 -Os -s -o test test.c
fugl:~> ls -l test
-rwxr-xr-x 1 sesse sesse 2784 2010-08-20 00:59 test
Do you know any good reasons for this increase in size?
/* Steinar */
--
Homepage: http://www.sesse.net/
Reply to: