Symbol visibility question

Andreas Schwab schwab@linux-m68k.org
Mon Nov 5 22:28:00 GMT 2012


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."



More information about the Libc-alpha mailing list