Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Oct 1997 11:41:26 -0700 (MST)
From:      Charles Mott <cmott@srv.net>
To:        freebsd-hackers@freebsd.org
Cc:        ari@suutari.iki.fi, brian@freebsd.org
Subject:   link tables and scope
Message-ID:  <Pine.BSF.3.96.971004113214.23797B-100000@darkstar.home>

next in thread | raw e-mail | index | archive | help
I have a question regarding linker tables created
for libraries.  In the packet aliasing library (libalias)
used by ppp and natd, there are two header files in
the source, alias.h and alias_local.h.  The first
contains "public" interfaces and the second is basically
a set of function prototypes used between different
modules within the library source, but not intended
for public access.

What I observe is that the link symbol table (I don't
know a better word for it), contains function names
both in alias.h and alias_local.h.  Is there any way
to somehow restrict the scope of some globals in a
library so that they cannot be linked by modules outside
the library.

The only way I know to do this is put the entire library
in a single file and make as much as possible static.

Charles Mott




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.971004113214.23797B-100000>