Hi all,
I build a static library of input/output functions with PRC-tools.
I wish that programs which link to this library pick up only the functions they need, so the prc file remains as small as possible.
The tests I've done show that the whole library is linked. I looked into PRC-tools documentation and didn't find an optimization option which remove unused code. Is there a way to do this ?
You'll have to write your own build script to do this. prc-tools doesn't support the -ffunction-sections switch that is needed to have an object file separate all the code into different sections. However, in building the Palm OS Glue libraries for prc-tools, we modified the source files so by using #defines, you could build a source file for a single function, and then built the source files lots of times to produce individual object files per public function.
-- Ben Combee, Technical Lead, Developer Services, PalmSource, Inc. "Combee on Palm OS" weblog: http://palmos.combee.net/ Developer Fourm Archives: http://news.palmos.com/read/all_forums/
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
