Armv5l Cross compiling static file size differences
I have been working on getting a small staticly compiled program for ARM.
I have staticly compiled with two different compilers
https://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-armv5l.tar.bz2 (cross-compiler-armv5l/bin/armv5l-gcc)
and
gcc-arm-linux-gnueabi
Now, my question is, why does the gcc-arm-linux-gnueabi compile my program to over 400kb and the uclibc binaries compile my program to 30kb?
This is a HUGE size difference and I am wanting to compile in armv7l but I can't find any binaries like ulibc has. Is there a way to cross compile straight from gcc to create the same effect as the uclibc binaries.
These are the flags I use: -s -O2 -static
If anyone could point me in the right direction as to how to cross compile gcc so that it isn't inflating my binary by 10 times it size that would be really helpful. Thanks!
链接地址: http://www.djcxy.com/p/70404.html下一篇: Armv5l交叉编译静态文件大小差异