s390: Enable VDSO for static linking

System Internals / glibc - Adhemerval Zanella [linaro.org] - 5 August 2019 19:38 EDT

Although s390 only enables vDSO for dynamically linked elf binaries (arch/s390/kernel/vdso.c:217), there is no indication in the code or associated commit message for why not enable it for statically linked binaries as well. To double check, I rebuilt a kernel with the check removed and the vDSO does work for static build for supplied symbols.

Checked on s390x-linux-gnu and s390-linux-gnu.

[BZ #19767]
- sysdeps/unix/sysv/linux/s390/init-first.c: Remove #ifdef SHARED.
- sysdeps/unix/sysv/linux/s390/libc-vdso.h: Likewise.
- sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h (ALWAYS_USE_VSYSCALL): Define.
- sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (ALWAYS_USE_VSYSCALL): Likewise.

5e855c8954 s390: Enable VDSO for static linking
ChangeLog | 8 ++++++++
sysdeps/unix/sysv/linux/s390/init-first.c | 8 ++------
sysdeps/unix/sysv/linux/s390/libc-vdso.h | 3 ---
sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h | 3 +++
sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h | 3 +++
5 files changed, 16 insertions(+), 9 deletions(-)

Upstream: sourceware.org


  • Share