Skip to content

Commit

Permalink
selftests/powerpc/pmu: Link ebb tests with -no-pie
Browse files Browse the repository at this point in the history
BugLink: https://bugs.launchpad.net/bugs/1812805

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>
(cherry picked from commit 98415da)
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Acked-by: Connor Kuehl <connor.kuehl@canonical.com>
Acked-by: Kleber Souza <kleber.souza@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
  • Loading branch information
shenki authored and smb49 committed May 15, 2019
1 parent e78c326 commit 91521b9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/testing/selftests/powerpc/pmu/ebb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ noarg:
# The EBB handler is 64-bit code and everything links against it
CFLAGS += -m64

# Toolchains may build PIE by default which breaks the assembly
LDFLAGS += -no-pie

TEST_GEN_PROGS := reg_access_test event_attributes_test cycles_test \
cycles_with_freeze_test pmc56_overflow_test \
ebb_vs_cpu_event_test cpu_event_vs_ebb_test \
Expand Down

0 comments on commit 91521b9

Please sign in to comment.