Re: Why is the binary much larger than the object files?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/09/2013 02:11 PM, Henrik Mannerström wrote:
When compiled with -O2 -flto, the object file sizes are:
  13216 Jul  9 14:57 RR-jump.o
  38864 Jul  9 14:57 RR.o
238496 Jul  9 14:57 main.o
  41560 Jul  9 14:57 random.o

Linked with
gcc -L/usr/lib64/atlas -O2 -flto -msse4  main.o random.o RR.o RR-jump.o
-lgsl -lcblas -latlas -lstdc++ -o main
the binary size is
4712993 Jul  9 14:57 main

Do you link statically, by chance?  What does "ldd ./main" show?

--
Florian Weimer / Red Hat Product Security Team




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux