This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [hurd,commited] hurd: Avoid some PLTs in libc and librt
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Samuel Thibault <samuel dot thibault at ens-lyon dot org>
- Cc: <libc-alpha at sourceware dot org>
- Date: Tue, 3 Apr 2018 00:17:40 +0000
- Subject: Re: [hurd,commited] hurd: Avoid some PLTs in libc and librt
- References: <20180402190912.1666-1-samuel.thibault@ens-lyon.org>
As a general matter, calling __foo instead of foo is something done for
namespace reasons, if there is a standard namespace (or, in principle, one
such as _DEFAULT_SOURCE, though we don't test that) including a function
in the calling file, but not foo. It may also fix local PLT issues, if
__foo is not exported from the library in question, but if there are only
PLT issues not namespace ones, the *_hidden_proto / *_hidden_def macros
would typically be called as a sufficient solution to the PLT issues.
Calling __foo does of course introduce the need for declarations of __foo
that may not have been previously needed, and those may need to replicate
properties of the public declarations of foo, such as attributes or the
presence of inline versions, to avoid regressions.
--
Joseph S. Myers
joseph@codesourcery.com