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 11/12] linux: Consolidate time implementation



On 25/06/2019 15:24, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>> 	* include/libc-symbols.h (hidden_def_redir): New macro.
> 
> This macro should have documentation in the large common block above it.
> Its purpose isn't obvious to me.
> 
>> +#if HAVE_IFUNC && defined USE_TIME_VSYSCALL_IFUNC
>> +/* Route externals calls direct to vDSO and static and internal calls to
>> +   fallback implementation (which also might call the vDSO).  */
>> +# ifdef SHARED
>> +#  define INIT_ARCH()
>> +libc_ifunc_redirected (__redirect_time, time,
>> +		       get_vdso_symbol (HAVE_TIME_VSYSCALL)
>> +		       ?: time_syscall);
>> +libc_hidden_def_redir (time_syscall, time)
>> +#  else
>> +strong_alias (time_syscall, time)
>> +#  endif /* SHARED  */
> 
> Does this really work on x86-64?  I don't think it's possible to call
> IFUNCs through hidden aliases.

The idea is to not call an IFUNC in the static case nor on internal 
hidden case for shared case. Only external calls are routes through
iFUNC.


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