Should -Os imply -shared-libgcc?
Paul Koning
pkoning@equallogic.com
Mon Nov 29 21:15:00 GMT 2004
>>>>> "Ian" == Ian Lance Taylor <ian@airs.com> writes:
Ian> It occurred to me that on appropriate platforms, -shared-libgcc
Ian> will typically generate a slightly smaller program. Does
Ian> anybody have an opinion on whether the use of -Os on the link
Ian> line should imply -shared-libgcc?
It should not.
Using shared libraries helps total memory usage if there are enough
processes using the library in question. If only one or two use the
library, then shared libraries hurt overall memory usage. Where
exactly the breakeven point is depends on which library functions are
actually used by given applications.
I've been through this in an embedded system optimization exercise...
paul
More information about the Gcc
mailing list