linux-stable/tools/testing/selftests/x86
Shuah Khan 3346a6a4e5 selftests: x86: sysret_ss_attrs doesn't build on a PIE build
sysret_ss_attrs fails to compile leading x86 test run to fail on systems
configured to build using PIE by default. Add -no-pie fix it.

Relocation might still fail if relocated above 4G. For now this change
fixes the build and runs x86 tests.

tools/testing/selftests/x86$ make
gcc -m64 -o .../tools/testing/selftests/x86/single_step_syscall_64 -O2
-g -std=gnu99 -pthread -Wall  single_step_syscall.c -lrt -ldl
gcc -m64 -o .../tools/testing/selftests/x86/sysret_ss_attrs_64 -O2 -g
-std=gnu99 -pthread -Wall  sysret_ss_attrs.c thunks.S -lrt -ldl
/usr/bin/ld: /tmp/ccS6pvIh.o: relocation R_X86_64_32S against `.text'
can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Makefile:49: recipe for target
'.../tools/testing/selftests/x86/sysret_ss_attrs_64' failed
make: *** [.../tools/testing/selftests/x86/sysret_ss_attrs_64] Error 1

Suggested-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2017-10-05 11:34:14 -06:00
..
.gitignore selftests: x86: add missing executables to .gitignore 2017-05-03 10:55:20 -06:00
check_cc.sh selftests, x86: Rework x86 target architecture detection 2015-05-12 20:02:40 -06:00
check_initial_reg_state.c selftests/x86: Add check_initial_reg_state() 2016-01-29 09:46:37 +01:00
entry_from_vm86.c selftests/x86: Add a fork() to entry_from_vm86 to catch fork bugs 2015-10-31 09:50:25 +01:00
fsgsbase.c selftests/x86/fsgsbase: Test selectors 1, 2, and 3 2017-08-10 17:15:13 +02:00
ioperm.c selftests/x86: Add a basic selftest for ioperm 2017-03-01 17:03:23 +01:00
iopl.c selftests/x86: Add an iopl test 2016-03-17 09:49:26 +01:00
ldt_gdt.c selftests/x86/ldt_gdt_32: Work around a glibc sigaction() bug 2017-03-23 08:25:07 +01:00
Makefile selftests: x86: sysret_ss_attrs doesn't build on a PIE build 2017-10-05 11:34:14 -06:00
mpx-debug.h x86/mpx, selftests: Add MPX self test 2016-06-14 12:19:24 +02:00
mpx-dig.c x86/mpx, selftests: Add MPX self test 2016-06-14 12:19:24 +02:00
mpx-hw.h x86/mpx, selftests: Add MPX self test 2016-06-14 12:19:24 +02:00
mpx-mini-test.c signal/testing: Don't look for __SI_FAULT in userspace 2017-07-19 19:13:15 -05:00
mpx-mm.h x86/mpx, selftests: Add MPX self test 2016-06-14 12:19:24 +02:00
pkey-helpers.h x86/pkeys: Add self-tests 2016-09-09 13:02:28 +02:00
protection_keys.c signal/testing: Don't look for __SI_FAULT in userspace 2017-07-19 19:13:15 -05:00
ptrace_syscall.c x86/selftests: Add clobbers for int80 on x86_64 2017-03-01 10:24:56 +01:00
raw_syscall_helper_32.S selftests/x86: Add a test for ptrace syscall restart and arg modification 2015-10-07 11:34:07 +02:00
sigreturn.c selftests/x86/sigreturn: Use CX, not AX, as the scratch register 2016-09-13 20:34:15 +02:00
single_step_syscall.c x86/selftests: Add clobbers for int80 on x86_64 2017-03-01 10:24:56 +01:00
syscall_arg_fault.c x86/entry, selftests/x86: Add a test for 32-bit fast syscall arg faults 2015-07-07 10:58:30 +02:00
syscall_nt.c selftests/x86: In syscall_nt, test NT|TF as well 2016-03-10 09:48:12 +01:00
sysret_rip.c selftests/x86: Add a selftest for SYSRET to noncanonical addresses 2017-01-05 09:20:02 +01:00
sysret_ss_attrs.c x86, selftests: Add a test for the "sysret_ss_attrs" bug 2015-05-08 13:33:59 +02:00
test_FCMOV.c x86/fpu/math-emu, selftests: Add tests for FCMOV and FCOMI insns 2015-09-20 10:19:52 +02:00
test_FCOMI.c x86/fpu/math-emu, selftests: Add tests for FCMOV and FCOMI insns 2015-09-20 10:19:52 +02:00
test_FISTTP.c x86/fpu/math-emu, selftests: Add test for FISTTP instructions 2015-09-20 16:19:01 +02:00
test_mremap_vdso.c selftests/x86: Add vDSO mremap() test 2016-07-08 14:17:51 +02:00
test_syscall_vdso.c x86/asm/entry/32, selftests: Add 'test_syscall_vdso' test 2015-09-18 09:40:48 +02:00
test_vdso.c selftests/x86: Add test_vdso to test getcpu() 2016-11-17 08:31:22 +01:00
thunks.S x86, selftests: Add a test for the "sysret_ss_attrs" bug 2015-05-08 13:33:59 +02:00
thunks_32.S x86/asm/entry/32, selftests: Add 'test_syscall_vdso' test 2015-09-18 09:40:48 +02:00
trivial_32bit_program.c selftests, x86: Rework x86 target architecture detection 2015-05-12 20:02:40 -06:00
trivial_64bit_program.c selftest, x86: fix incorrect comment 2015-05-26 15:58:41 -06:00
unwind_vdso.c selftests/x86: Style fixes for the 'unwind_vdso' test 2015-10-14 16:56:28 +02:00
vdso_restorer.c selftests/x86: Test __kernel_sigreturn and __kernel_rt_sigreturn 2016-01-13 10:34:40 +01:00