summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/sgx
diff options
context:
space:
mode:
authorJo Van Bulck <jo.vanbulck@cs.kuleuven.be>2023-10-05 18:38:53 +0300
committerDave Hansen <dave.hansen@linux.intel.com>2023-12-08 21:05:28 +0300
commitec44ca1e34bc3a9864a8c1bf8636066ec6d5d2e5 (patch)
tree78fbf55755feefd14da326ace670b3bcaaf71de1 /tools/testing/selftests/sgx
parent022416496008bd51cb7b33975cc0008749329a86 (diff)
downloadlinux-ec44ca1e34bc3a9864a8c1bf8636066ec6d5d2e5.tar.xz
selftests/sgx: Discard unsupported ELF sections
Building the test enclave with -static-pie may produce a dynamic symbol table, but this is not supported for enclaves and any relocations need to happen manually (e.g., as for "encl_op_array"). Thus, opportunistically discard ".dyn*" and ".gnu.hash" which the enclave loader cannot handle. Signed-off-by: Jo Van Bulck <jo.vanbulck@cs.kuleuven.be> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Link: https://lore.kernel.org/all/20231005153854.25566-13-jo.vanbulck%40cs.kuleuven.be
Diffstat (limited to 'tools/testing/selftests/sgx')
-rw-r--r--tools/testing/selftests/sgx/test_encl.lds2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/sgx/test_encl.lds b/tools/testing/selftests/sgx/test_encl.lds
index 333a3e78fdc9..ffe851a1cac4 100644
--- a/tools/testing/selftests/sgx/test_encl.lds
+++ b/tools/testing/selftests/sgx/test_encl.lds
@@ -33,6 +33,8 @@ SECTIONS
*(.note*)
*(.debug*)
*(.eh_frame*)
+ *(.dyn*)
+ *(.gnu.hash)
}
}