Enable VDSO on static on aarch64.
Commit Message
From: Rafael Avila de Espindola <rafael@espindo.la>
---
2018-11-24 Rafael Ávila de Espíndola <rafael@espindo.la>
[BZ #19767]
* sysdeps/unix/sysv/linux/aarch64/init-first.c: remove #ifdef SHARED.
* sysdeps/unix/sysv/linux/aarch64/libc-vdso.h: remove #ifdef SHARED.
* sysdeps/unix/sysv/linux/aarch64/sysdep.h: define ALWAYS_USE_VSYSCALL.
Comments
On 24/11/18 23:24, Rafael Ávila de Espíndola wrote:
> From: Rafael Avila de Espindola <rafael@espindo.la>
>
OK to commit with commit title:
Enable VDSO for static linking on aarch64
or equivalent.
> ---
>
> 2018-11-24 Rafael Ávila de Espíndola <rafael@espindo.la>
> [BZ #19767]
> * sysdeps/unix/sysv/linux/aarch64/init-first.c: remove #ifdef SHARED.
> * sysdeps/unix/sysv/linux/aarch64/libc-vdso.h: remove #ifdef SHARED.
> * sysdeps/unix/sysv/linux/aarch64/sysdep.h: define ALWAYS_USE_VSYSCALL.
>
i think this is not the standard changelog style
(uppercase sentence, defined entity in () after filename).
Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
thanks.
"Szabolcs Nagy" <Szabolcs.Nagy@arm.com> writes:
> On 24/11/18 23:24, Rafael Ávila de Espíndola wrote:
>> From: Rafael Avila de Espindola <rafael@espindo.la>
>>
>
> OK to commit with commit title:
>
> Enable VDSO for static linking on aarch64
>
> or equivalent.
I am OK with that message. Could you please commit it?
>> [BZ #19767]
>> * sysdeps/unix/sysv/linux/aarch64/init-first.c: remove #ifdef SHARED.
>> * sysdeps/unix/sysv/linux/aarch64/libc-vdso.h: remove #ifdef SHARED.
>> * sysdeps/unix/sysv/linux/aarch64/sysdep.h: define ALWAYS_USE_VSYSCALL.
>>
>
> i think this is not the standard changelog style
> (uppercase sentence, defined entity in () after filename).
I think the () are for the function/class, no? I see
* sysdeps/ia64/fpu/e_log2.S: Add versioned symbols.
but
* sysdeps/ieee754/dbl-64/e_log2.c (__ieee754_log2): Rename to __log2
and add necessary aliases.
An updated ChangeLog is
2018-11-26 Rafael Ávila de Espíndola <rafael@espindo.la>
[BZ #19767]
* sysdeps/unix/sysv/linux/aarch64/init-first.c: Remove #ifdef SHARED.
* sysdeps/unix/sysv/linux/aarch64/libc-vdso.h: Remove #ifdef SHARED.
* sysdeps/unix/sysv/linux/aarch64/sysdep.h: Define ALWAYS_USE_VSYSCALL.
Thanks,
Rafael
@@ -16,9 +16,8 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#ifdef SHARED
-# include <dl-vdso.h>
-# include <libc-vdso.h>
+#include <dl-vdso.h>
+#include <libc-vdso.h>
int (*VDSO_SYMBOL(gettimeofday)) (struct timeval *, void *) attribute_hidden;
int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *);
@@ -46,7 +45,6 @@ _libc_vdso_platform_setup (void)
VDSO_SYMBOL(clock_getres) = p;
}
-# define VDSO_SETUP _libc_vdso_platform_setup
-#endif
+#define VDSO_SETUP _libc_vdso_platform_setup
#include <csu/init-first.c>
@@ -19,15 +19,11 @@
#ifndef _LIBC_VDSO_H
#define _LIBC_VDSO_H
-#ifdef SHARED
-
-# include <sysdep-vdso.h>
+#include <sysdep-vdso.h>
extern int (*VDSO_SYMBOL(gettimeofday)) (struct timeval *, void *)
attribute_hidden;
extern int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *);
extern int (*VDSO_SYMBOL(clock_getres)) (clockid_t, struct timespec *);
-#endif
-
#endif /* _LIBC_VDSO_H */
@@ -19,6 +19,9 @@
#ifndef _LINUX_AARCH64_SYSDEP_H
#define _LINUX_AARCH64_SYSDEP_H 1
+/* Always enable vsyscalls on aarch64 */
+#define ALWAYS_USE_VSYSCALL 1
+
#include <sysdeps/unix/sysdep.h>
#include <sysdeps/aarch64/sysdep.h>
#include <sysdeps/unix/sysv/linux/generic/sysdep.h>