* Limiting the exported symols in a shared library
@ 2002-10-11 12:14 Barry Leslie
2002-10-11 13:50 ` Moshe Libenson
0 siblings, 1 reply; 2+ messages in thread
From: Barry Leslie @ 2002-10-11 12:14 UTC (permalink / raw)
To: gcc-help
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: Limiting the exported symols in a shared library
2002-10-11 12:14 Limiting the exported symols in a shared library Barry Leslie
@ 2002-10-11 13:50 ` Moshe Libenson
0 siblings, 0 replies; 2+ messages in thread
From: Moshe Libenson @ 2002-10-11 13:50 UTC (permalink / raw)
To: gcc-help
For the GNU linker it's --version-script
Read about it hear
http://www.gnu.org/manual/ld-2.9.1/html_mono/ld.html#SEC25
Moshe Libenson
moshe@libenson.org
-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of Barry Leslie
Sent: Friday, October 11, 2002 9:16 PM
To: gcc-help@gcc.gnu.org
Subject: 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-10-11 20:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-11 12:14 Limiting the exported symols in a shared library Barry Leslie
2002-10-11 13:50 ` Moshe Libenson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).