linux(4): Fix linker warning about undefined vdso symbols

Pointed out by:		bz
MFC after:		3 days
This commit is contained in:
Dmitry Chagin 2023-08-20 00:48:36 +03:00
parent 4f9fac78d4
commit a129642ced

View File

@ -26,6 +26,14 @@
* SUCH DAMAGE. * 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 static int
fls(int mask) fls(int mask)
{ {
@ -295,7 +303,7 @@ freebsd_clock_gettime(clockid_t clock_id, struct timespec *ts)
* *
*/ */
int 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; struct timespec ts;
clockid_t which; clockid_t which;
@ -312,7 +320,7 @@ __vdso_clock_gettime(clockid_t clock_id, struct l_timespec *lts)
} }
int int
__vdso_gettimeofday(l_timeval *ltv, struct timezone *tz) __vdsoN(gettimeofday)(l_timeval *ltv, struct timezone *tz)
{ {
struct timeval tv; struct timeval tv;
int error; int error;
@ -324,7 +332,7 @@ __vdso_gettimeofday(l_timeval *ltv, struct timezone *tz)
} }
int 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)); return (__vdso_clock_getres_fallback(clock_id, lts));