This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Enable VDSO for static linking on s390
- From: Rafael Avila de Espindola <rafael at espindo dot la>
- To: Stefan Liebler <stli at linux dot ibm dot com>, libc-alpha at sourceware dot org
- Date: Wed, 19 Dec 2018 19:29:48 +0000
- Subject: Re: [PATCH] Enable VDSO for static linking on s390
- References: <bVueHRKMvp0lVGWp2IbM5k9JMfOoMAM0RrQDL2yUU6UEcY8tTOL401vXwT3FCpNGbtSrGH45MJ-2ctZuxp7m8PMa9Ba-A-Axbhs3gWJsqoc=@espindo.la> <22ce22d9-645c-c69e-acad-1d1c32708044@linux.ibm.com>
- Reply-to: Rafael Avila de Espindola <rafael at espindo dot la>
"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