git: cb1883b03223 - stable/13 - linux(4): Fix linker warning about undefined vdso symbols
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 22 Aug 2023 09:19:01 UTC
The branch stable/13 has been updated by dchagin:
URL: https://cgit.FreeBSD.org/src/commit/?id=cb1883b032233bb6e382efa9475d54502592b33d
commit cb1883b032233bb6e382efa9475d54502592b33d
Author: Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2023-08-19 21:48:36 +0000
Commit: Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2023-08-22 09:18:48 +0000
linux(4): Fix linker warning about undefined vdso symbols
Pointed out by: bz
MFC after: 3 days
(cherry picked from commit a129642ced9e6ceacf98c7663bc1178eb32a78be)
---
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));