Hi,

I have a question:

Suppose i have a source code file as

test.c
------------

#include <stdio.h>
void __attribute__ (( visibility ("hidden") )) sayHello (void)
{
   printf("hello");
}

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

You can use the strip utility to remove all the symbols from your object file.

Alternatively, declare sayHello() to be a static function.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.