linux-stable/tools
Shuah Khan 353f71fe3c selftests: x86: sysret_ss_attrs doesn't build on a PIE build
commit 3346a6a4e5 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-28 18:39:25 +02:00
..
accounting tools: move accounting tool from Documentation 2016-09-23 13:07:15 -06:00
arch KPTI: Rename to PAGE_TABLE_ISOLATION 2018-01-05 15:46:35 +01:00
build tools build: Add tools tree support for 'make -s' 2018-02-25 11:05:52 +01:00
cgroup
firewire
gpio tools/gpio: Fix build error with musl libc 2018-02-03 17:05:34 +01:00
hv hv: kvp: Avoid reading past allocated blocks from KVP file 2017-12-14 09:28:11 +01:00
iio Second set of iio new device support, features and cleanups for the 4.9 cycle. 2016-09-14 20:42:03 +02:00
include tools include: Do not use poison with C++ 2017-12-09 22:01:49 +01:00
kvm/kvm_stat tools: kvm_stat: Add comments 2016-05-25 16:12:06 +02:00
laptop tools: move laptops dslm tool from Documentation 2016-09-23 13:07:21 -06:00
lguest tools/lguest: Don't bork the terminal in case of wrong args 2016-09-08 08:05:24 +02:00
lib tools lib traceevent: Fix prev/next_prio for deadline tasks 2017-08-06 18:59:48 -07:00
net
nfsd
objtool objtool: Improve error message for bad file argument 2018-01-23 19:57:05 +01:00
pcmcia tools: move pcmcia crc32hash tool from Documentation 2016-09-23 13:07:27 -06:00
perf perf stat: Fix CVS output format for non-supported counters 2018-03-28 18:39:24 +02:00
power cpupower : Fix cpupower working when cpu0 is offline 2018-02-03 17:05:35 +01:00
scripts tools build: Add tools tree support for 'make -s' 2018-02-25 11:05:52 +01:00
spi Merge remote-tracking branches 'spi/topic/ti-qspi', 'spi/topic/tools', 'spi/topic/txx9' and 'spi/topic/xlp' into spi-next 2016-09-30 09:14:22 -07:00
testing selftests: x86: sysret_ss_attrs doesn't build on a PIE build 2018-03-28 18:39:25 +02:00
thermal/tmon
time
usb tools/usbip: fixes build with musl libc toolchain 2018-03-22 09:17:56 +01:00
virtio tools/virtio/ringtest: fix run-on-all.sh for offline cpus 2017-01-26 08:24:46 +01:00
vm tools/vm/page_owner: increase temporary buffer size 2016-07-26 16:19:19 -07:00
Makefile tools/gpio: add install section 2016-06-23 11:07:13 +02:00