[Prev]

5.2 Special or embedded compile (reduced functionality)

libzxid contains thousands of functions and any given application is unlikely to use them all. Thus the easiest, safest, no loss of functionality, way to reduce the footprint is to simply enable compiler and linker flags that support dead function elimination. ((Unfortunately the gnu ld does not support dead
 function elimination. You should file this as a bug to them. If they
 tell you to put every one of the 7000-some functions in a separate <tt>.c</tt> file,
 consider the scalability implications of this. Read the comments in
 <tt>pulverize.pl</tt> for a full scoop and an approach.))

On gcc you should investigate compilation with "-ffunction-sections -fdata-sections" and linking with "-Wl,--gc-sections".

If you need to squeeze zxid into as minimal space as possible, some functionality trade-offs are supported. I stress that you should only attempt these trade-offs once you are familiar with zxid and know what you are doing. The canned install instructions and tutorial walk thrus stop working if you omit significant functionality.


[Prev | Next]