This is the mail archive of the gcc-help@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]

Limiting the exported symols in a shared library


Hi,

I want to create a shared lib and limit the symbols exported from it to the
functions specified in an api list. I don't want all the global symbols to
be visible. 

On many platforms this is done simply by listing the symbols in a file and
then passing the file name in as a command line argument. For example on AIX
you use -bE:api.exports and on Sun you use -M api.exports.

What is the equivalent for the linker on Linux?

I tried --retain-symbols-file api.exports but all the global variables and
functions were still visible when I did a 'nm -g mylib.so'.

Can anybody help me out here?

Thanks,
    Barry


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