git: a129642ced9e - main - linux(4): Fix linker warning about undefined vdso symbols
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 19 Aug 2023 21:49:00 UTC
The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=a129642ced9e6ceacf98c7663bc1178eb32a78be commit a129642ced9e6ceacf98c7663bc1178eb32a78be Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2023-08-19 21:48:36 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2023-08-19 21:48:36 +0000 linux(4): Fix linker warning about undefined vdso symbols Pointed out by: bz MFC after: 3 days --- sys/compat/linux/linux_vdso_gtod.inc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sys/compat/linux/linux_vdso_gtod.inc b/sys/compat/linux/linux_vdso_gtod.inc index 05f19c67022a..e508f821725d 100644 --- a/sys/compat/linux/linux_vdso_gtod.inc +++ b/sys/compat/linux/linux_vdso_gtod.inc @@ -26,6 +26,14 @@ * SUCH DAMAGE. */ +#if defined(__aarch64__) +#define __VDSO_PREFIX __kernel +#else +#define __VDSO_PREFIX __vdso +#endif + +#define __vdsoN(x) __CONCAT(__CONCAT(__VDSO_PREFIX,_),x) + static int fls(int mask) { @@ -295,7 +303,7 @@ freebsd_clock_gettime(clockid_t clock_id, struct timespec *ts) * */ int -__vdso_clock_gettime(clockid_t clock_id, struct l_timespec *lts) +__vdsoN(clock_gettime)(clockid_t clock_id, struct l_timespec *lts) { struct timespec ts; clockid_t which; @@ -312,7 +320,7 @@ __vdso_clock_gettime(clockid_t clock_id, struct l_timespec *lts) } int -__vdso_gettimeofday(l_timeval *ltv, struct timezone *tz) +__vdsoN(gettimeofday)(l_timeval *ltv, struct timezone *tz) { struct timeval tv; int error; @@ -324,7 +332,7 @@ __vdso_gettimeofday(l_timeval *ltv, struct timezone *tz) } int -__vdso_clock_getres(clockid_t clock_id, struct l_timespec *lts) +__vdsoN(clock_getres)(clockid_t clock_id, struct l_timespec *lts) { return (__vdso_clock_getres_fallback(clock_id, lts));