From 3fc7b463013bfded7d60fd8af48d6c74140571e0 Mon Sep 17 00:00:00 2001 From: Jo Van Bulck Date: Tue, 17 Sep 2024 19:23:40 +0000 Subject: [PATCH] app: fix linker warnings --- app/aep-redirect/Enclave/Makefile | 2 +- app/aep-redirect/Makefile | 1 + app/bench/Enclave/Makefile | 2 +- app/foreshadow/Enclave/Makefile | 2 +- app/lvi/Enclave/Makefile | 2 +- app/lvi/Makefile | 1 + app/memcmp/Enclave/Makefile | 2 +- 7 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/aep-redirect/Enclave/Makefile b/app/aep-redirect/Enclave/Makefile index 7ae0d26..e030c95 100644 --- a/app/aep-redirect/Enclave/Makefile +++ b/app/aep-redirect/Enclave/Makefile @@ -31,7 +31,7 @@ OUTPUT_T = $(ENCLAVE).so OUTPUT_T_UNSIG = $(ENCLAVE).unsigned.so OUTPUT_U = lib$(ENCLAVE)_proxy.a LIB_DIRS = -L $(SGX_SDK)/lib$(LIB_SUFX)/ -LD_FLAGS += -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles \ +LD_FLAGS += -z noexecstack -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles \ -Wl,--whole-archive -Wl,--start-group $(ENCLAVE_LIBS) -Wl,--end-group \ -Wl,--no-whole-archive -Wl,--start-group $(ENCLAVE_LIB_PARTS) -Wl,--end-group \ -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \ diff --git a/app/aep-redirect/Makefile b/app/aep-redirect/Makefile index 6752efb..ad54180 100644 --- a/app/aep-redirect/Makefile +++ b/app/aep-redirect/Makefile @@ -1,6 +1,7 @@ LIBSGXSTEP_DIR = ../.. LIBSGXSTEP = $(LIBSGXSTEP_DIR)/libsgxstep URTS_LIB_PATH = $(LIBSGXSTEP_DIR)/linux-sgx/psw/urts/linux +-include $(LIBSGXSTEP)/Makefile.config ifeq ($(SGX_SDK),) SGX_SDK = /opt/intel/sgxsdk diff --git a/app/bench/Enclave/Makefile b/app/bench/Enclave/Makefile index 99feeb2..5ea5f90 100644 --- a/app/bench/Enclave/Makefile +++ b/app/bench/Enclave/Makefile @@ -31,7 +31,7 @@ OUTPUT_T = $(ENCLAVE).so OUTPUT_T_UNSIG = $(ENCLAVE).unsigned.so OUTPUT_U = lib$(ENCLAVE)_proxy.a LIB_DIRS = -L$(SGX_SDK)/lib$(LIB_SUFX)/ -LD_FLAGS += -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles \ +LD_FLAGS += -z noexecstack -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles \ -Wl,--whole-archive -Wl,--start-group $(ENCLAVE_LIBS) -Wl,--end-group \ -Wl,--no-whole-archive -Wl,--start-group $(ENCLAVE_LIB_PARTS) -Wl,--end-group \ -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \ diff --git a/app/foreshadow/Enclave/Makefile b/app/foreshadow/Enclave/Makefile index 35a5336..0a319ca 100644 --- a/app/foreshadow/Enclave/Makefile +++ b/app/foreshadow/Enclave/Makefile @@ -31,7 +31,7 @@ OUTPUT_T = $(ENCLAVE).so OUTPUT_T_UNSIG = $(ENCLAVE).unsigned.so OUTPUT_U = lib$(ENCLAVE)_proxy.a LIB_DIRS = -L$(SGX_SDK)/lib$(LIB_SUFX)/ -LD_FLAGS += -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles \ +LD_FLAGS += -z noexecstack -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles \ -Wl,--whole-archive -Wl,--start-group $(ENCLAVE_LIBS) -Wl,--end-group \ -Wl,--no-whole-archive -Wl,--start-group $(ENCLAVE_LIB_PARTS) -Wl,--end-group \ -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \ diff --git a/app/lvi/Enclave/Makefile b/app/lvi/Enclave/Makefile index a2baaa1..51c3c57 100644 --- a/app/lvi/Enclave/Makefile +++ b/app/lvi/Enclave/Makefile @@ -31,7 +31,7 @@ OUTPUT_T = $(ENCLAVE).so OUTPUT_T_UNSIG = $(ENCLAVE).unsigned.so OUTPUT_U = lib$(ENCLAVE)_proxy.a LIB_DIRS = -L $(SGX_SDK)/lib$(LIB_SUFX)/ -LD_FLAGS += -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles \ +LD_FLAGS += -z noexecstack -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles \ -Wl,--whole-archive -Wl,--start-group $(ENCLAVE_LIBS) -Wl,--end-group \ -Wl,--no-whole-archive -Wl,--start-group $(ENCLAVE_LIB_PARTS) -Wl,--end-group \ -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \ diff --git a/app/lvi/Makefile b/app/lvi/Makefile index f77ce86..77481e8 100644 --- a/app/lvi/Makefile +++ b/app/lvi/Makefile @@ -1,6 +1,7 @@ LIBSGXSTEP_DIR = ../.. LIBSGXSTEP = $(LIBSGXSTEP_DIR)/libsgxstep URTS_LIB_PATH = $(LIBSGXSTEP_DIR)/linux-sgx/psw/urts/linux +-include $(LIBSGXSTEP)/Makefile.config ifeq ($(SGX_SDK),) SGX_SDK = /opt/intel/sgxsdk diff --git a/app/memcmp/Enclave/Makefile b/app/memcmp/Enclave/Makefile index 9d51c83..0a5c9a0 100644 --- a/app/memcmp/Enclave/Makefile +++ b/app/memcmp/Enclave/Makefile @@ -31,7 +31,7 @@ OUTPUT_T = $(ENCLAVE).so OUTPUT_T_UNSIG = $(ENCLAVE).unsigned.so OUTPUT_U = lib$(ENCLAVE)_proxy.a LIB_DIRS = -L$(SGX_SDK)/lib$(LIB_SUFX)/ -LD_FLAGS += -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles \ +LD_FLAGS += -z noexecstack -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles \ -Wl,--whole-archive -Wl,--start-group $(ENCLAVE_LIBS) -Wl,--end-group \ -Wl,--no-whole-archive -Wl,--start-group $(ENCLAVE_LIB_PARTS) -Wl,--end-group \ -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \