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

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

authored by

Jo Van Bulck and committed by
Dave Hansen
ec44ca1e 02241649

+2
+2
tools/testing/selftests/sgx/test_encl.lds
··· 33 33 *(.note*) 34 34 *(.debug*) 35 35 *(.eh_frame*) 36 + *(.dyn*) 37 + *(.gnu.hash) 36 38 } 37 39 } 38 40