This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Symbol visibility question
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Jeff Law <law at redhat dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Mon, 05 Nov 2012 23:28:06 +0100
- Subject: Re: Symbol visibility question
- References: <50982D9A.9010802@redhat.com>
Jeff Law <law@redhat.com> writes:
> I need to create a trivial little function that svc_{tcp,udp,unix} can use
> for failures. Let's call it __svc_accept_failed.
>
> That function needs to be visible to the svc_{tcp,udp,unix}.c files, but
> must not be visible outside glibc or sunrpc.
Since it's just an internal function no visibility settings are needed.
It needs to start with __ to be clean for static linking, but that's
all. (See __internal_statvfs for an existing example.)
> Unfortunately, I have found any glibc internals documentation on how to do
> this. I see various libc_hidden_proto, libc_hidden_def macros, but no
> documentation on how to use them.
Those macro are used to add internal aliases to publicly visible
symbols, which is not relevant here.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."