This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Use libc_hidden_proto / _def for hidden wchar ifunc symbols.


On 11/13/2017 02:58 PM, H.J. Lu wrote:

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?

We touched this briefly before, when I suggested that we need to automate this. But Joseph thought it wouldn't be possible:

  <https://sourceware.org/ml/libc-alpha/2017-09/msg00113.html>

I don't know if the IFUNC vs hidden symbol issues changes matters significantly. I still don't think it's a good use of our time to predict in generic headers what the linker may need in the end, as the result of what happens to be emitted by the compiler and assembler.

I'm also not sure if the existing GCC attributes give us sufficient control. I think we need:

  (i)   local call within the current DSO, non-IFUNC implementation
  (ii)  local call within the current DSO, IFUNC implementation
  (iii) non-local call
    (1a) without symbol interposition
    (1b) with symbol interposition (for malloc/free/…)
    and (second choice)
    (2a) through PLT (without --enable-bind-now)
    (2b) without PLT (with --enable-bind-now and recent toolchain)

(ii) looks very similar to (iii)+(1a)+(2b). But I don't know if that's true for all architectures.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]