aboutsummaryrefslogtreecommitdiff
path: root/string
diff options
context:
space:
mode:
authorSteve Ellcey <sellcey@caviumnetworks.com>2018-06-14 08:18:42 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2018-06-14 13:56:57 +0100
commit3c7b9f1fc37c8a639df7406af100a2d389ff843a (patch)
tree035e75bf0b4bc3e0e871959e731df2a5628dfc1d /string
parentc59ee916a66299f23d81568c77d7af3be17d4b6c (diff)
downloadglibc-3c7b9f1fc37c8a639df7406af100a2d389ff843a.zip
glibc-3c7b9f1fc37c8a639df7406af100a2d389ff843a.tar.gz
glibc-3c7b9f1fc37c8a639df7406af100a2d389ff843a.tar.bz2
aarch64: Use an ifunc/VDSO to implement gettimeofday in shared glibc.
This patch uses an ifunc to implement gettimeofday in the shared libc. This is faster compared to the vsyscall mechanism that has to check a global pointer, demangle it and call it indirectly when the VDSO is present. Resolving the gettimeofday symbol directly to the VDSO code is safe because there are no failures that the libc has to handle by setting errno like in a generic vsyscall (the only failure when the VDSO code falls back to a syscall is EFAULT, but passing an invalid pointer is undefined behaviour so returning -EFAULT is fine). If the kernel supports the VDSO interface we use it for extern calls, otherwise the old vsyscall method is used which falls back to a syscall. The static version of gettimeofday continues to use a syscall, libc.so internal calls use the old vsyscall method. * sysdeps/unix/sysv/linux/aarch64/gettimeofday.c: New file.
Diffstat (limited to 'string')
0 files changed, 0 insertions, 0 deletions