public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Barry Leslie <barry.leslie@shaw.ca>
To: gcc-help@gcc.gnu.org
Subject: Limiting the exported symols in a shared library
Date: Fri, 11 Oct 2002 12:14:00 -0000	[thread overview]
Message-ID: <B9CC718C.2509%Barry.Leslie@shaw.ca> (raw)

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

             reply	other threads:[~2002-10-11 19:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-11 12:14 Barry Leslie [this message]
2002-10-11 13:50 ` Moshe Libenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B9CC718C.2509%Barry.Leslie@shaw.ca \
    --to=barry.leslie@shaw.ca \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).