[uClibc] About the code build and codesize reduce

David Meggy dmeggy at techsol.ca
Fri Oct 22 17:56:50 UTC 2004


On Fri, 2004-10-22 at 10:43, Shu-Liang Lee wrote:
> the compiler command, how to do and it could just link the add()
> function in the math.a only.
> please give me a idea?

you want to have every function in the math.a archive in a different .o
file.
  
> gcc hello.c -static math.a 

math.a will be statically linked in regardless of the static line, since
it is a static library.  However be specifying static you have made all
libraries link in statically.
  
> 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....

see above

-- 
~~~~~~~~~~~~~~~~~~~~~~~~
     David Meggy
     Engineering

Technical Solutions Inc.
Unit #1 7157 Honeyman St
Delta BC Canada, V4G 1E2
     www.techsol.ca

eMail: dmeggy at techsol.ca
Tel: 604 946 TECH (8324)
Fax: 604 946 6445
~~~~~~~~~~~~~~~~~~~~~~~~




More information about the uClibc mailing list