This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Use libc_hidden_proto / _def for hidden wchar ifunc symbols.
On Mon, Nov 13, 2017 at 3:55 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 11/13/2017 11:16 AM, Stefan Liebler wrote:
>>
>> This patch adds the libc_hidden_proto / libc_hidden_def construct.
>> Then the __GI_* symbols are the default-ifunc-variants which can be called
>> without PLT.
>
>
> attribute_hidden and *_hidden_{proto,def} conflict on some architectures.
> You need to remove attribute_hidden as part of this change.
That is true. On i686, a hidden IFUNC function inside libc.so must be compiled
with -fPIC via PLT since EBX must be loaded with GOT first. This
isn't an issue
for x86-64 since PLT uses PC-relative addressing. In this case, we
should remove
hidden attribute, instead of using __GI_* symbols, if we sill want to use IFUNC
inside libc.so.
Now I have question, is there a way to apply attribute_hidden to a function
depending on architecture? For example, we remove attribute_hidden
from __wcsnlen, __wcscat, __wcsncpy, __wcpncpy, __wcschrnul in headers
under include/. For x86, we mark them hidden in a header file under
sysdeps/x86?
--
H.J.