View Single Post
Join Date: Jul 2007
Posts: 25
Reputation: nabilchampion is an unknown quantity at this point 
Solved Threads: 0
nabilchampion nabilchampion is offline Offline
Light Poster

Query related to Hiding symbol in Shared Library

 
0
  #1
Dec 31st, 2008
Hi,

I have a question:

Suppose i have a source code file as

test.c
------------
  1.  
  2. #include <stdio.h>
  3. void __attribute__ (( visibility ("hidden") )) sayHello (void)
  4. {
  5. printf("hello");
  6. }

i make shared library using gcc say named as libhello.so

now although the function sayHello is not exported to the libhello.so
but when i run this command:

shell> nm libhello.so

the resultant display shows one of the symbol there as sayHello

Is this possible that I completely hide this symbol so that nm doesnt read this local symbol in the library.

Kind Regards
Last edited by nabilchampion; Dec 31st, 2008 at 9:38 am.
Reply With Quote