[uClibc] About the code build and codesize reduce
Shu-Liang Lee
shuliang at ms8.hinet.net
Fri Oct 22 17:43:05 UTC 2004
Dear...
Remember I used the glibc and use gcc to compile my source code...
If a library, names "math.a", it provides
add()
minus()
multiple()
divide()
sum()
square()
when I write a main function in hello.c, I use add() function in math.a
only, such as
main()
{
add()
return 0;
}
the compiler command, how to do and it could just link the add()
function in the math.a only.
please give me a idea?
gcc hello.c -static math.a
right?
The question when I meet, is dynamic link to statically link...
If I want to use -lpthread -lstdc++ -ldl to static
armeb-linux-uclib-gcc hello.c math.a -static -lpthread -lstdc++ -ldl
it seems that the codesize is summation of the pthread, stdc++ and
dl....
How to reduce it? I try to add -O2...I want to reduce more....
Please give me more suggestions...thanks.
Regards,
ShuLiang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/uclibc/attachments/20041023/1e9ba09a/attachment-0001.htm
More information about the uClibc
mailing list