]> Git Repo - J-linux.git/commitdiff
selftests/sgx: Discard unsupported ELF sections
authorJo Van Bulck <[email protected]>
Thu, 5 Oct 2023 15:38:53 +0000 (17:38 +0200)
committerDave Hansen <[email protected]>
Fri, 8 Dec 2023 18:05:28 +0000 (10:05 -0800)
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 <[email protected]>
Signed-off-by: Dave Hansen <[email protected]>
Reviewed-by: Jarkko Sakkinen <[email protected]>
Link: https://lore.kernel.org/all/20231005153854.25566-13-jo.vanbulck%40cs.kuleuven.be
tools/testing/selftests/sgx/test_encl.lds

index 333a3e78fdc975c53a0917b1566f55cd053c5adf..ffe851a1cac4063135edb5e0ae46a3c80dcb5edb 100644 (file)
@@ -33,6 +33,8 @@ SECTIONS
                *(.note*)
                *(.debug*)
                *(.eh_frame*)
+               *(.dyn*)
+               *(.gnu.hash)
        }
 }
 
This page took 0.052339 seconds and 4 git commands to generate.