diff --git a/src/libfaketime.c b/src/libfaketime.c index 18e2c94..363f38c 100644 --- a/src/libfaketime.c +++ b/src/libfaketime.c @@ -1936,6 +1936,7 @@ timer_settime_common(timer_t_or_int timerid, int flags, /* * Faked timer_settime() compatible with implementation in GLIBC 2.2 */ +__attribute__ ((symver ("timer_settime@GLIBC_2.2"))) int timer_settime_22(int timerid, int flags, const struct itimerspec *new_value, struct itimerspec *old_value) @@ -1958,6 +1959,7 @@ int timer_settime_22(int timerid, int flags, /* * Faked timer_settime() compatible with implementation in GLIBC 2.3.3 */ +__attribute__ ((symver ("timer_settime@@GLIBC_2.3.3"))) int timer_settime_233(timer_t timerid, int flags, const struct itimerspec *new_value, struct itimerspec *old_value) @@ -2031,6 +2033,7 @@ int timer_gettime_common(timer_t_or_int timerid, struct itimerspec *curr_value, /* * Faked timer_gettime() compatible with implementation in GLIBC 2.2 */ +__attribute__ ((symver ("timer_gettime@GLIBC_2.2"))) int timer_gettime_22(timer_t timerid, struct itimerspec *curr_value) { if (!initialized) @@ -2051,6 +2054,7 @@ int timer_gettime_22(timer_t timerid, struct itimerspec *curr_value) /* * Faked timer_gettime() compatible with implementation in GLIBC 2.3.3 */ +__attribute__ ((symver ("timer_gettime@@GLIBC_2.3.3"))) int timer_gettime_233(timer_t timerid, struct itimerspec *curr_value) { if (!initialized) @@ -2068,10 +2072,6 @@ int timer_gettime_233(timer_t timerid, struct itimerspec *curr_value) } } -__asm__(".symver timer_gettime_22, timer_gettime@GLIBC_2.2"); -__asm__(".symver timer_gettime_233, timer_gettime@@GLIBC_2.3.3"); -__asm__(".symver timer_settime_22, timer_settime@GLIBC_2.2"); -__asm__(".symver timer_settime_233, timer_settime@@GLIBC_2.3.3"); #ifdef __linux__ /* @@ -3463,6 +3463,11 @@ struct pthread_cond_monotonic { static struct pthread_cond_monotonic *monotonic_conds = NULL; +#if defined __ARM_ARCH || defined FORCE_PTHREAD_NONVER +__attribute__ ((symver ("pthread_cond_init@@"))) +#else +__attribute__ ((symver ("pthread_cond_init@@GLIBC_2.3.2"))) +#endif int pthread_cond_init_232(pthread_cond_t *restrict cond, const pthread_condattr_t *restrict attr) { clockid_t clock_id; @@ -3501,6 +3506,11 @@ int pthread_cond_init_232(pthread_cond_t *restrict cond, const pthread_condattr_ return result; } +#if defined __ARM_ARCH || defined FORCE_PTHREAD_NONVER +__attribute__ ((symver ("pthread_cond_destroy@@"))) +#else +__attribute__ ((symver ("pthread_cond_destroy@@GLIBC_2.3.2"))) +#endif int pthread_cond_destroy_232(pthread_cond_t *cond) { struct pthread_cond_monotonic* e; @@ -3608,26 +3618,22 @@ int pthread_cond_timedwait_common(pthread_cond_t *cond, pthread_mutex_t *mutex, return result; } +__attribute__ ((symver ("pthread_cond_timedwait@GLIBC_2.2.5"))) int pthread_cond_timedwait_225(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime) { return pthread_cond_timedwait_common(cond, mutex, abstime, FT_COMPAT_GLIBC_2_2_5); } +#if defined __ARM_ARCH || defined FORCE_PTHREAD_NONVER +__attribute__ ((symver ("pthread_cond_timedwait@@"))) +#else +__attribute__ ((symver ("pthread_cond_timedwait@@GLIBC_2.3.2"))) +#endif int pthread_cond_timedwait_232(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime) { return pthread_cond_timedwait_common(cond, mutex, abstime, FT_COMPAT_GLIBC_2_3_2); } -__asm__(".symver pthread_cond_timedwait_225, pthread_cond_timedwait@GLIBC_2.2.5"); -#if defined __ARM_ARCH || defined FORCE_PTHREAD_NONVER -__asm__(".symver pthread_cond_timedwait_232, pthread_cond_timedwait@@"); -__asm__(".symver pthread_cond_init_232, pthread_cond_init@@"); -__asm__(".symver pthread_cond_destroy_232, pthread_cond_destroy@@"); -#else -__asm__(".symver pthread_cond_timedwait_232, pthread_cond_timedwait@@GLIBC_2.3.2"); -__asm__(".symver pthread_cond_init_232, pthread_cond_init@@GLIBC_2.3.2"); -__asm__(".symver pthread_cond_destroy_232, pthread_cond_destroy@@GLIBC_2.3.2"); -#endif #endif