[PATCH] Enable VDSO for static linking on s390
Rafael Avila de Espindola
rafael@espindo.la
Wed Dec 19 19:57:00 GMT 2018
"Stefan Liebler" <stli@linux.ibm.com> writes:
> Hi Rafael,
>
> can you please resend the patch?
Attached.
> But I have a question: Do I need a special kernel parameter / configuration?
I don't think so, but I don't know if there is something special on s390x.
> When I run it on Intel, I recognize that there is a vdso mapped and
> AT_SYSINFO_EHDR contains the address.
That was already working. What was missing is just glibc using the
loaded vdso.
What I have been using for testing is running the following program with
strace:
#include <time.h>
#include <stdio.h>
int main() {
struct timespec ts;
clock_gettime(CLOCK_REALTIME, &ts);
printf("%ld.%09ld\n", ts.tv_sec, ts.tv_nsec);
return 0;
}
My expectation is
* If built as shared, no syscall for clock_realtime.
* If built as static with glibc master, there will be a syscall.
* The patch avoids the syscall.
Cheers,
Rafael
More information about the Libc-alpha
mailing list