selftests/sgx: Discard unsupported ELF sections
authorJo Van Bulck <jo.vanbulck@cs.kuleuven.be>
Thu, 5 Oct 2023 15:38:53 +0000 (17:38 +0200)
committerDave Hansen <dave.hansen@linux.intel.com>
Fri, 8 Dec 2023 18:05:28 +0000 (10:05 -0800)
commitec44ca1e34bc3a9864a8c1bf8636066ec6d5d2e5
tree78fbf55755feefd14da326ace670b3bcaaf71de1
parent022416496008bd51cb7b33975cc0008749329a86
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
tools/testing/selftests/sgx/test_encl.lds