Created attachment 279555 A testcase
commit 379d98ddf41344273d9718556f761420f4dc80b3 Author: Alistair Strachan <email address hidden> Date: Fri Aug 3 10:39:31 2018 -0700
x86: vdso: Use $LD instead of $CC to link
The vdso{32,64}.so can fail to link with CC=clang when clang tries to find a suitable GCC toolchain to link these libraries with.
/usr/bin/ld: arch/x86/entry/vdso/vclock_gettime.o: access beyond end of merged section (782)
breaks i386 vDSO with incorrect unwind info. The testcase here should report:
[hjl@gnu-hsw-1 tmp]$ gcc -g -O2 -funwind-tables -m32 foo.c [hjl@gnu-hsw-1 tmp]$ ./a.out Obtained backtrace with 7 functions Function 0: ./a.out() [0x8049272] Function 1: linux-gate.so.1(__kernel_sigreturn+0) [0xf7f990b0] Function 2: linux-gate.so.1(__kernel_vsyscall+0x9) [0xf7f99099] Function 3: /lib/libc.so.6(__read+0x2b) [0xf7ea72ab] Function 4: ./a.out() [0x80493a9] Function 5: ./a.out() [0x80493f3] Function 6: ./a.out() [0x80493f3] [hjl@gnu-hsw-1 tmp]$
But kernel 4.19 got
[hjl@gnu-cfl-1 tmp]$ ./a.out Obtained backtrace with 4 functions Failure on line 67 [hjl@gnu-cfl-1 tmp]$
Revert the commit fixes i386 vDSO.
Created attachment 279555
A testcase
commit 379d98ddf413442 73d9718556f7614 20f4dc80b3
Author: Alistair Strachan <email address hidden>
Date: Fri Aug 3 10:39:31 2018 -0700
x86: vdso: Use $LD instead of $CC to link
The vdso{32,64}.so can fail to link with CC=clang when clang tries to find
a suitable GCC toolchain to link these libraries with.
/usr/bin/ld: arch/x86/ entry/vdso/ vclock_ gettime. o:
access beyond end of merged section (782)
breaks i386 vDSO with incorrect unwind info. The testcase here should
report:
[hjl@gnu-hsw-1 tmp]$ gcc -g -O2 -funwind-tables -m32 foo.c so.1(__ kernel_ sigreturn+ 0) [0xf7f990b0] so.1(__ kernel_ vsyscall+ 0x9) [0xf7f99099] so.6(__ read+0x2b) [0xf7ea72ab]
[hjl@gnu-hsw-1 tmp]$ ./a.out
Obtained backtrace with 7 functions
Function 0: ./a.out() [0x8049272]
Function 1: linux-gate.
Function 2: linux-gate.
Function 3: /lib/libc.
Function 4: ./a.out() [0x80493a9]
Function 5: ./a.out() [0x80493f3]
Function 6: ./a.out() [0x80493f3]
[hjl@gnu-hsw-1 tmp]$
But kernel 4.19 got
[hjl@gnu-cfl-1 tmp]$ ./a.out
Obtained backtrace with 4 functions
Failure on line 67
[hjl@gnu-cfl-1 tmp]$
Revert the commit fixes i386 vDSO.