On 2006-06-14, David Brown <da...@westcontrol.com> wrote:

> Symbols that span seperate files must be visible to the linker, and must
> therefore be in your object files (either as individual object files, or
> combined in a library).  Everything that is local to a single file can be
> declared "static", and thus hidden.
>
> If you want only a limited subset of your global symbols to be visible
> (i.e., application-usable symbols but not internal library symbols), then I
> can only think of two ways to do it.  One is to combine your code into a
> single large C file so that there are no internal library global symbols
> (they can be declared static).  You'd want to automate this in some way, so
> that you can write, test and debug the code as separate modules, and only
> combine them for release.  The other way is to help get the gcc 4.1 version
> of mpcgcc finished, as gcc4.1 is able to do this sort of thing itself.

The third option is to link the object modules together then strip
them (keeping only the symbols he wants to be visible).

-- 
Grant Edwards                   grante             Yow!  .. here I am in 53
                                  at               B.C. and all I want is a
                               visi.com            dill pickle!!


Reply via email to