This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: exporting symbols in shared libraries


On 24-Oct-2002, thomas joseph <thomascanny@yahoo.co.nz> wrote:
> 
> Hi All,
>  I have a small question to you.
>  Could some body tell me how do I stop exporting
>  a symbol in a shared libraries using gcc.
> 
>  I do n't want to make it static. Because I need to 
>  access it from other files.
>  Is there any compiler option/construct to support
>  this.

In the latest (CVS) versions of gcc, you can use the visibility attribute,
e.g. __attribute__((visibility(hidden))).  This only works for ELF targets,
AFAIK.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]