Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/powerpc/pmu: Link ebb tests with -no-pie

When running the ebb tests after building on a ppc64le Ubuntu machine:

$ pmu/ebb/reg_access_test: error while loading shared libraries:
R_PPC64_ADDR16_HI reloc at 0x000000013a965130 for symbol `' out of
range

This is because the Ubuntu toolchain builds has PIE enabled by default.
Change it to be always off instead.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Joel Stanley and committed by
Michael Ellerman
98415da0 27825349

+3
+3
tools/testing/selftests/powerpc/pmu/ebb/Makefile
··· 5 5 # The EBB handler is 64-bit code and everything links against it 6 6 CFLAGS += -m64 7 7 8 + # Toolchains may build PIE by default which breaks the assembly 9 + LDFLAGS += -no-pie 10 + 8 11 TEST_GEN_PROGS := reg_access_test event_attributes_test cycles_test \ 9 12 cycles_with_freeze_test pmc56_overflow_test \ 10 13 ebb_vs_cpu_event_test cpu_event_vs_ebb_test \