mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-26 06:50:07 +00:00
riscv: Enable VDSO for static linking
Checked on riscv64-linux-gnu-rv64imafdc-lp64d qemu system with some static tests. [BZ #19767] * sysdeps/unix/sysv/linux/riscv/init-first.c: Remove #ifdef SHARED. * sysdeps/unix/sysv/linux/riscv/libc-vdso.h: Likewise. * sysdeps/unix/sysv/linux/riscv/sysdep.h (ALWAYS_USE_VSYSCALL): Define.
This commit is contained in:
parent
503fc587f3
commit
27a0914e45
@ -1,5 +1,11 @@
|
|||||||
2019-08-05 Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
2019-08-05 Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||||
|
|
||||||
|
[BZ #19767]
|
||||||
|
* sysdeps/unix/sysv/linux/riscv/init-first.c: Remove #ifdef SHARED.
|
||||||
|
* sysdeps/unix/sysv/linux/riscv/libc-vdso.h: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/riscv/sysdep.h (ALWAYS_USE_VSYSCALL):
|
||||||
|
Define.
|
||||||
|
|
||||||
* sysdeps/sh/libm-test-ulps: Update.
|
* sysdeps/sh/libm-test-ulps: Update.
|
||||||
|
|
||||||
2019-08-05 Florian Weimer <fweimer@redhat.com>
|
2019-08-05 Florian Weimer <fweimer@redhat.com>
|
||||||
|
@ -17,9 +17,8 @@
|
|||||||
License along with the GNU C Library; if not, see
|
License along with the GNU C Library; if not, see
|
||||||
<http://www.gnu.org/licenses/>. */
|
<http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#ifdef SHARED
|
#include <dl-vdso.h>
|
||||||
# include <dl-vdso.h>
|
#include <libc-vdso.h>
|
||||||
# include <libc-vdso.h>
|
|
||||||
|
|
||||||
long int (*VDSO_SYMBOL (getcpu)) (unsigned int *, unsigned int *, void *)
|
long int (*VDSO_SYMBOL (getcpu)) (unsigned int *, unsigned int *, void *)
|
||||||
attribute_hidden;
|
attribute_hidden;
|
||||||
@ -52,7 +51,6 @@ _libc_vdso_platform_setup (void)
|
|||||||
VDSO_SYMBOL (clock_getres) = p;
|
VDSO_SYMBOL (clock_getres) = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
# define VDSO_SETUP _libc_vdso_platform_setup
|
#define VDSO_SETUP _libc_vdso_platform_setup
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <csu/init-first.c>
|
#include <csu/init-first.c>
|
||||||
|
@ -20,9 +20,7 @@
|
|||||||
#ifndef _LIBC_VDSO_H
|
#ifndef _LIBC_VDSO_H
|
||||||
#define _LIBC_VDSO_H
|
#define _LIBC_VDSO_H
|
||||||
|
|
||||||
#ifdef SHARED
|
#include <sysdep-vdso.h>
|
||||||
|
|
||||||
# include <sysdep-vdso.h>
|
|
||||||
|
|
||||||
extern long int (*VDSO_SYMBOL (getcpu)) (unsigned int *, unsigned int *, void *)
|
extern long int (*VDSO_SYMBOL (getcpu)) (unsigned int *, unsigned int *, void *)
|
||||||
attribute_hidden;
|
attribute_hidden;
|
||||||
@ -33,6 +31,4 @@ extern long int (*VDSO_SYMBOL (clock_gettime)) (clockid_t, struct timespec *)
|
|||||||
extern long int (*VDSO_SYMBOL (clock_getres)) (clockid_t, struct timespec *)
|
extern long int (*VDSO_SYMBOL (clock_getres)) (clockid_t, struct timespec *)
|
||||||
attribute_hidden;
|
attribute_hidden;
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _LIBC_VDSO_H */
|
#endif /* _LIBC_VDSO_H */
|
||||||
|
@ -19,6 +19,9 @@
|
|||||||
#ifndef _LINUX_RISCV_SYSDEP_H
|
#ifndef _LINUX_RISCV_SYSDEP_H
|
||||||
#define _LINUX_RISCV_SYSDEP_H 1
|
#define _LINUX_RISCV_SYSDEP_H 1
|
||||||
|
|
||||||
|
/* Always enable vsyscalls on riscv */
|
||||||
|
#define ALWAYS_USE_VSYSCALL 1
|
||||||
|
|
||||||
#include <sysdeps/unix/sysv/linux/generic/sysdep.h>
|
#include <sysdeps/unix/sysv/linux/generic/sysdep.h>
|
||||||
#include <tls.h>
|
#include <tls.h>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user