This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: mapfile
- From: lrtaylor at micron dot com
- To: <abansal at netegrity dot com>, <gcc-help at gcc dot gnu dot org>
- Date: Tue, 28 Oct 2003 09:58:54 -0700
- Subject: RE: mapfile
-----Original Message-----
From: Ajay Bansal [mailto:abansal@netegrity.com]
> Does Linux/gcc support a mapfile syntax, so that we can hide/export
> symbols in shared lib on Linux as well?
I believe that the ability to hide/export symbols is a function of the
file format and linker more than of the compiler. Linux uses the ELF
file format, and the indications I've seen are that it doesn't support
what you are asking. Then again, I know that if you declare functions
or variables as being static (global functions and variables, not class
member functions and variables), they will only be visible within that
compilation unit. That at least allows you to define and use functions
that won't be visible outside of the library, but it does not allow you
to define functions that can be used in other compilation units in the
library but that aren't visible outside the library.
Then again, someone probably knows better than me that can give a more
definitive answer than "I don't think so..."
Cheers,
Lyle