Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
170 changes: 170 additions & 0 deletions samplecode/new_helloworld/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

######## SGX SDK Settings ########

SGX_SDK ?= /opt/intel/sgxsdk
SGX_MODE ?= SW
SGX_ARCH ?= x64

TOP_DIR := ../..
include $(TOP_DIR)/buildenv.mk

ifeq ($(shell getconf LONG_BIT), 32)
SGX_ARCH := x86
else ifeq ($(findstring -m32, $(CXXFLAGS)), -m32)
SGX_ARCH := x86
endif

ifeq ($(SGX_ARCH), x86)
SGX_COMMON_CFLAGS := -m32
SGX_LIBRARY_PATH := $(SGX_SDK)/lib
SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x86/sgx_sign
SGX_EDGER8R := $(SGX_SDK)/bin/x86/sgx_edger8r
else
SGX_COMMON_CFLAGS := -m64
SGX_LIBRARY_PATH := $(SGX_SDK)/lib64
SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x64/sgx_sign
SGX_EDGER8R := $(SGX_SDK)/bin/x64/sgx_edger8r
endif

ifeq ($(SGX_DEBUG), 1)
ifeq ($(SGX_PRERELEASE), 1)
$(error Cannot set SGX_DEBUG and SGX_PRERELEASE at the same time!!)
endif
endif

ifeq ($(SGX_DEBUG), 1)
SGX_COMMON_CFLAGS += -O0 -g
else
SGX_COMMON_CFLAGS += -O2
endif

SGX_COMMON_CFLAGS += -fstack-protector

######## CUSTOM Settings ########

CUSTOM_LIBRARY_PATH := ./lib
CUSTOM_BIN_PATH := ./bin
CUSTOM_EDL_PATH := ../../edl
CUSTOM_COMMON_PATH := ../../common
######## EDL Settings ########

# Enclave_EDL_Files := edl/Enclave_t.c edl/Enclave_t.h
Enclave_EDL_Files := edl/Enclave_t.c edl/Enclave_t.h edl/Enclave_u.c edl/Enclave_u.h

######## APP Settings ########

App_Rust_Flags := --release
App_SRC_Files := $(shell find app/ -type f -name '*.rs') $(shell find app/ -type f -name 'Cargo.toml')
App_Include_Paths := -I ./app -I./include -I$(SGX_SDK)/include -I$(CUSTOM_EDL_PATH)
App_C_Flags := $(SGX_COMMON_CFLAGS) -fPIC -Wno-attributes $(App_Include_Paths)

App_Rust_Path := ./app/target/release
App_Enclave_u_Object :=lib/libEnclave_u.a
App_Name := bin/app

######## Enclave Settings ########

ifneq ($(SGX_MODE), HW)
Trts_Library_Name := sgx_trts_sim
Service_Library_Name := sgx_tservice_sim
else
Trts_Library_Name := sgx_trts
Service_Library_Name := sgx_tservice
endif
Crypto_Library_Name := sgx_tcrypto
KeyExchange_Library_Name := sgx_tkey_exchange
ProtectedFs_Library_Name := sgx_tprotected_fs

RustEnclave_C_Files := $(wildcard ./enclave/*.c)
RustEnclave_C_Objects := $(RustEnclave_C_Files:.c=.o)
RustEnclave_Include_Paths := -I$(CUSTOM_COMMON_PATH)/inc -I$(CUSTOM_EDL_PATH) -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc -I$(SGX_SDK)/include/stlport -I$(SGX_SDK)/include/epid -I ./enclave -I./include

RustEnclave_Link_Libs := -L$(CUSTOM_LIBRARY_PATH) -lenclave1
RustEnclave_Compile_Flags := $(SGX_COMMON_CFLAGS) $(ENCLAVE_CFLAGS) $(RustEnclave_Include_Paths) -fPIC
RustEnclave_Link_Flags := -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles -L$(SGX_LIBRARY_PATH) \
-Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive \
-Wl,--start-group -lsgx_tstdc -l$(Service_Library_Name) -l$(Crypto_Library_Name) $(RustEnclave_Link_Libs) -Wl,--end-group \
-Wl,--version-script=enclave1/Enclave.lds -fPIC \
$(ENCLAVE_LDFLAGS)

RustEnclave_Name := enclave1/enclave1.so
Signed_RustEnclave_Name := bin/enclave1.signed.so

.PHONY: all
all: $(App_Name) $(Signed_RustEnclave_Name) $(RustEnclave_Name) edl/Enclave_t.o

######## EDL Objects ########

# $(Enclave_EDL_Files): $(SGX_EDGER8R) edl/Enclave.edl
# $(SGX_EDGER8R) --trusted edl/Enclave.edl --search-path $(SGX_SDK)/include --search-path $(CUSTOM_EDL_PATH) --trusted-dir edl
# $(SGX_EDGER8R) --untrusted edl/Enclave.edl --search-path $(SGX_SDK)/include --search-path $(CUSTOM_EDL_PATH) --untrusted-dir edl
# @echo "GEN => $(Enclave_EDL_Files)"

######## App Objects ########

edl/Enclave_u.o: $(Enclave_EDL_Files)
@$(CC) $(App_C_Flags) -c edl/Enclave_u.c -o $@
@echo "CC <= $<"

$(App_Enclave_u_Object): edl/Enclave_u.o
$(AR) rcsD $@ $^

$(App_Name): $(App_SRC_Files) $(App_Enclave_u_Object)
@cd app && RUSTFLAGS="--cfg target_env=\"sgx\" " SGX_SDK=$(SGX_SDK) cargo build $(App_Rust_Flags)
@echo "Cargo => $@"
mkdir -p bin
cp $(App_Rust_Path)/app ./bin

######## Enclave Objects ########

# edl/Enclave_t.o: $(Enclave_EDL_Files)
# @$(CC) $(RustEnclave_Compile_Flags) -c edl/Enclave_t.c -o $@
# @echo "CC <= $<"

edl/Enclave_t.o: $(Enclave_EDL_Files)
@$(CC) $(RustEnclave_Compile_Flags) -c edl/Enclave_t.c -o $@
@echo "CC <= $<"

$(RustEnclave_Name): enclave edl/Enclave_t.o
# mkdir -p lib/obj
@$(CXX) edl/Enclave_t.o -o $@ $(RustEnclave_Link_Flags)
@echo "LINK => $@"

$(Signed_RustEnclave_Name): $(RustEnclave_Name)
mkdir -p bin
@$(SGX_ENCLAVE_SIGNER) sign -key enclave1/Enclave_private.pem -enclave $(RustEnclave_Name) -out $@ -config enclave1/Enclave.config.xml
@echo "SIGN => $@"

.PHONY: enclave
enclave:
$(MAKE) -C ./enclave1/


.PHONY: clean
clean:
@rm -f $(App_Name) $(RustEnclave_Name) $(Signed_RustEnclave_Name) enclave/*_t.* app/*_u.* lib/*.a
@cd enclave1 && cargo clean && rm -f Cargo.lock
@cd app && cargo clean && rm -f Cargo.lock
@cd bin && rm -f ./*
@cd edl && rm -f ./*.o





57 changes: 57 additions & 0 deletions samplecode/new_helloworld/edl/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
SGX_SDK ?= /opt/intel/sgxsdk
SGX_MODE ?= SW
SGX_ARCH ?= x64

TOP_DIR := ../incubator-teaclave-sgx-sdk
include $(TOP_DIR)/buildenv.mk

ifeq ($(shell getconf LONG_BIT), 32)
SGX_ARCH := x86
else ifeq ($(findstring -m32, $(CXXFLAGS)), -m32)
SGX_ARCH := x86
endif

ifeq ($(SGX_ARCH), x86)
SGX_COMMON_CFLAGS := -m32
SGX_LIBRARY_PATH := $(SGX_SDK)/lib
SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x86/sgx_sign
SGX_EDGER8R := $(SGX_SDK)/bin/x86/sgx_edger8r
else
SGX_COMMON_CFLAGS := -m64
SGX_LIBRARY_PATH := $(SGX_SDK)/lib64
SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x64/sgx_sign
SGX_EDGER8R := $(SGX_SDK)/bin/x64/sgx_edger8r
endif
Crypto_Library_Name := sgx_tcrypto
KeyExchange_Library_Name := sgx_tkey_exchange
ProtectedFs_Library_Name := sgx_tprotected_fs

RustEnclave_C_Files := $(wildcard ./enclave/*.c)
RustEnclave_C_Objects := $(RustEnclave_C_Files:.c=.o)
RustEnclave_Include_Paths := -I$(CUSTOM_COMMON_PATH)/inc -I$(CUSTOM_EDL_PATH) -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc -I$(SGX_SDK)/include/stlport -I$(SGX_SDK)/include/epid -I ./enclave -I./include

RustEnclave_Link_Libs := -L$(CUSTOM_LIBRARY_PATH) -lenclave
RustEnclave_Compile_Flags := $(SGX_COMMON_CFLAGS) $(ENCLAVE_CFLAGS) $(RustEnclave_Include_Paths)
RustEnclave_Link_Flags := -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles -L$(SGX_LIBRARY_PATH) \
-Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive \
-Wl,--start-group -lsgx_tstdc -l$(Service_Library_Name) -l$(Crypto_Library_Name) $(RustEnclave_Link_Libs) -Wl,--end-group \
-Wl,--version-script=enclave/Enclave.lds \
$(ENCLAVE_LDFLAGS)

Enclave_EDL_Files := Enclave_t.c Enclave_t.h
CUSTOM_EDL_PATH := ../incubator-teaclave-sgx-sdk/sgx_edl/edl

$(Enclave_EDL_Files): $(SGX_EDGER8R) Enclave.edl
$(SGX_EDGER8R) --trusted Enclave.edl --search-path $(SGX_SDK)/include --search-path $(CUSTOM_EDL_PATH) --trusted-dir .
@echo "GEN => $(Enclave_EDL_Files)"

enclave/Enclave_t.o: $(Enclave_EDL_Files)
@$(CC) $(RustEnclave_Compile_Flags) -c Enclave_t.c -o $@
@echo "CC <= $<"

# $(RustEnclave_Name): enclave enclave/Enclave_t.o
# @$(CXX) enclave/Enclave_t.o -o $@ $(RustEnclave_Link_Flags)
# @echo "LINK => $@"

.PHONY: all
all: enclave/Enclave_t.o
55 changes: 55 additions & 0 deletions samplecode/new_helloworld/enclave1/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[package]
name = "enclave1"
version = "0.1.0"
edition = "2021"

[lib]
name = "enclave1"
# 只生成动态库和静态库
crate-type = ["staticlib"]

[features]
default = []


[build-dependencies]
syn = { version = "1.0", features = ["full", "parsing"] }
quote = "1.0"

[target.'cfg(not(target_env = "sgx"))'.dependencies]
sgx_new_edl = { path = "../../../sgx_new_edl" }
sgx_types = { git = "https://github.com/apache/teaclave-sgx-sdk.git" }
sgx_tstd = { git = "https://github.com/apache/teaclave-sgx-sdk.git" }
sgx_serialize = { git = "https://github.com/apache/teaclave-sgx-sdk.git"}
sgx_serialize_derive = { git = "https://github.com/apache/teaclave-sgx-sdk.git" }

[patch.'https://github.com/apache/teaclave-sgx-sdk.git']
sgx_align_struct_attribute = { path = "../../../sgx_align_struct_attribute" }
sgx_alloc = { path = "../../../sgx_alloc" }
sgx_backtrace = { path = "../../../sgx_backtrace" }
sgx_backtrace_sys = { path = "../../../sgx_backtrace_sys" }
sgx_build_helper = { path = "../../../sgx_build_helper" }
sgx_cov = { path = "../../../sgx_cov" }
sgx_crypto_helper = { path = "../../../sgx_crypto_helper" }
sgx_demangle = { path = "../../../sgx_demangle" }
sgx_libc = { path = "../../../sgx_libc" }
sgx_no_tstd = { path = "../../../sgx_no_tstd" }
sgx_rand = { path = "../../../sgx_rand" }
sgx_rand_derive = { path = "../../../sgx_rand_derive" }
sgx_serialize = { path = "../../../sgx_serialize" }
sgx_serialize_derive = { path = "../../../sgx_serialize_derive" }
sgx_serialize_derive_internals = { path = "../../../sgx_serialize_derive_internals" }
sgx_tcrypto = { path = "../../../sgx_tcrypto" }
sgx_tcrypto_helper = { path = "../../../sgx_tcrypto_helper" }
sgx_tdh = { path = "../../../sgx_tdh" }
sgx_tkey_exchange = { path = "../../../sgx_tkey_exchange" }
sgx_tprotected_fs = { path = "../../../sgx_tprotected_fs" }
sgx_trts = { path = "../../../sgx_trts" }
sgx_tse = { path = "../../../sgx_tse" }
sgx_tseal = { path = "../../../sgx_tseal" }
sgx_tstd = { path = "../../../sgx_tstd" }
sgx_tunittest = { path = "../../../sgx_tunittest" }
sgx_types = { path = "../../../sgx_types" }
#sgx_ucrypto = { path = "../../../sgx_ucrypto" }
sgx_unwind = { path = "../../../sgx_unwind" }
#sgx_urts = { path = "../../../sgx_urts" }
12 changes: 12 additions & 0 deletions samplecode/new_helloworld/enclave1/Enclave.config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!-- Please refer to User's Guide for the explanation of each field -->
<EnclaveConfiguration>
<ProdID>0</ProdID>
<ISVSVN>0</ISVSVN>
<StackMaxSize>0x40000</StackMaxSize>
<HeapMaxSize>0x100000</HeapMaxSize>
<TCSNum>1</TCSNum>
<TCSPolicy>1</TCSPolicy>
<DisableDebug>0</DisableDebug>
<MiscSelect>0</MiscSelect>
<MiscMask>0xFFFFFFFF</MiscMask>
</EnclaveConfiguration>
9 changes: 9 additions & 0 deletions samplecode/new_helloworld/enclave1/Enclave.lds
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
enclave.so
{
global:
g_global_data_sim;
g_global_data;
enclave_entry;
local:
*;
};
39 changes: 39 additions & 0 deletions samplecode/new_helloworld/enclave1/Enclave_private.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
-----BEGIN RSA PRIVATE KEY-----
MIIG4gIBAAKCAYEAroOogvsj/fZDZY8XFdkl6dJmky0lRvnWMmpeH41Bla6U1qLZ
AmZuyIF+mQC/cgojIsrBMzBxb1kKqzATF4+XwPwgKz7fmiddmHyYz2WDJfAjIveJ
ZjdMjM4+EytGlkkJ52T8V8ds0/L2qKexJ+NBLxkeQLfV8n1mIk7zX7jguwbCG1Pr
nEMdJ3Sew20vnje+RsngAzdPChoJpVsWi/K7cettX/tbnre1DL02GXc5qJoQYk7b
3zkmhz31TgFrd9VVtmUGyFXAysuSAb3EN+5VnHGr0xKkeg8utErea2FNtNIgua8H
ONfm9Eiyaav1SVKzPHlyqLtcdxH3I8Wg7yqMsaprZ1n5A1v/levxnL8+It02KseD
5HqV4rf/cImSlCt3lpRg8U5E1pyFQ2IVEC/XTDMiI3c+AR+w2jSRB3Bwn9zJtFlW
KHG3m1xGI4ck+Lci1JvWWLXQagQSPtZTsubxTQNx1gsgZhgv1JHVZMdbVlAbbRMC
1nSuJNl7KPAS/VfzAgEDAoIBgHRXxaynbVP5gkO0ug6Qw/E27wzIw4SmjsxG6Wpe
K7kfDeRskKxESdsA/xCrKkwGwhcx1iIgS5+Qscd1Yg+1D9X9asd/P7waPmWoZd+Z
AhlKwhdPsO7PiF3e1AzHhGQwsUTt/Y/aSI1MpHBvy2/s1h9mFCslOUxTmWw0oj/Q
ldIEgWeNR72CE2+jFIJIyml6ftnb6qzPiga8Bm48ubKh0kvySOqnkmnPzgh+JBD6
JnBmtZbfPT97bwTT+N6rnPqOOApvfHPf15kWI8yDbprG1l4OCUaIUH1AszxLd826
5IPM+8gINLRDP1MA6azECPjTyHXhtnSIBZCyWSVkc05vYmNXYUNiXWMajcxW9M02
wKzFELO8NCEAkaTPxwo4SCyIjUxiK1LbQ9h8PSy4c1+gGP4LAMR8xqP4QKg6zdu9
osUGG/xRe/uufgTBFkcjqBHtK5L5VI0jeNIUAgW/6iNbYXjBMJ0GfauLs+g1VsOm
WfdgXzsb9DYdMa0OXXHypmV4GwKBwQDUwQj8RKJ6c8cT4vcWCoJvJF00+RFL+P3i
Gx2DLERxRrDa8AVGfqaCjsR+3vLgG8V/py+z+dxZYSqeB80Qeo6PDITcRKoeAYh9
xlT3LJOS+k1cJcEmlbbO2IjLkTmzSwa80fWexKu8/Xv6vv15gpqYl1ngYoqJM3pd
vzmTIOi7MKSZ0WmEQavrZj8zK4endE3v0eAEeQ55j1GImbypSf7Idh7wOXtjZ7WD
Dg6yWDrri+AP/L3gClMj8wsAxMV4ZR8CgcEA0fzDHkFa6raVOxWnObmRoDhAtE0a
cjUj976NM5yyfdf2MrKy4/RhdTiPZ6b08/lBC/+xRfV3xKVGzacm6QjqjZrUpgHC
0LKiZaMtccCJjLtPwQd0jGQEnKfMFaPsnhOc5y8qVkCzVOSthY5qhz0XNotHHFmJ
gffVgB0iqrMTvSL7IA2yqqpOqNRlhaYhNl8TiFP3gIeMtVa9rZy31JPgT2uJ+kfo
gV7sdTPEjPWZd7OshGxWpT6QfVDj/T9T7L6tAoHBAI3WBf2DFvxNL2KXT2QHAZ9t
k3imC4f7U+wSE6zILaDZyzygA4RUbwG0gv8/TJVn2P/Eynf76DuWHGlaiLWnCbSz
Az2DHBQBBaku409zDQym3j1ugMRjzzSQWzJg0SIyBH3hTmnYcn3+Uqcp/lEBvGW6
O+rsXFt3pukqJmIV8HzLGGaLm62BHUeZf3dyWm+i3p/hQAL7Xvu04QW70xuGqdr5
afV7p5eaeQIJXyGQJ0eylV/90+qxjMKiB1XYg6WYvwKBwQCL/ddpgOdHJGN8uRom
e7Zq0Csi3hGheMKlKbN3vcxT5U7MdyHtTZZOJbTvxKNNUNYH/8uD+PqDGNneb29G
BfGzvI3EASyLIcGZF3OhKwZd0jUrWk2y7Vhob91jwp2+t73vdMbkKyI4mHOuXvGv
fg95si9oO7EBT+Oqvhccd2J+F1IVXncccYnF4u5ZGWt5lLewN/pVr7MjjykeaHqN
t+rfnQam2psA6fL4zS2zTmZPzR2tnY8Y1GBTi0Ko1OKd1HMCgcAb5cB/7/AQlhP9
yQa04PLH9ygQkKKptZp7dy5WcWRx0K/hAHRoi2aw1wZqfm7VBNu2SLcs90kCCCxp
6C5sfJi6b8NpNbIPC+sc9wsFr7pGo9SFzQ78UlcWYK2Gu2FxlMjonhka5hvo4zvg
WxlpXKEkaFt3gLd92m/dMqBrHfafH7VwOJY2zT3WIpjwuk0ZzmRg5p0pG/svVQEH
NZmwRwlopysbR69B/n1nefJ84UO50fLh5s5Zr3gBRwbWNZyzhXk=
-----END RSA PRIVATE KEY-----
45 changes: 45 additions & 0 deletions samplecode/new_helloworld/enclave1/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
Rust_Enclave_Name := libenclave.a
Rust_Enclave_Files := $(wildcard src/*.rs)
Rust_Target_Path := $(CURDIR)/../../../xargo

ifeq ($(MITIGATION-CVE-2020-0551), LOAD)
export MITIGATION_CVE_2020_0551=LOAD
else ifeq ($(MITIGATION-CVE-2020-0551), CF)
export MITIGATION_CVE_2020_0551=CF
endif

.PHONY: all

all: $(Rust_Enclave_Name)

$(Rust_Enclave_Name): $(Rust_Enclave_Files)
ifeq ($(XARGO_SGX), 1)
RUST_TARGET_PATH=$(Rust_Target_Path) xargo build --target x86_64-unknown-linux-sgx --release
cp ./target/x86_64-unknown-linux-sgx/release/libtest_enclave.a ../lib/libenclave.a
# else
# cargo build --release --verbose
# cp ./target/release/libtest_enclave.a ../lib/libenclave.a
# endif
else
cargo build
cp ./target/debug/libenclave1.a ../lib/libenclave1.a
endif
# = note: "cc" "-Wl,--version-script=/tmp/rustcn70efR/list" "-m64" "/tmp/rustcn70efR/symbols.o" "/root/tee/test_enclave/target/release/deps/test_enclave.test_enclave.92037451-cgu.0.rcgu.o" "/root/tee/test_enclave/target/release/deps/test_enclave.test_enclave.92037451-cgu.1.rcgu.o" "/root/tee/test_enclave/target/release/deps/test_enclave.test_enclave.92037451-cgu.2.rcgu.o" "/root/tee/test_enclave/target/release/deps/test_enclave.test_enclave.92037451-cgu.3.rcgu.o" "/root/tee/test_enclave/target/release/deps/test_enclave.test_enclave.92037451-cgu.4.rcgu.o" "/root/tee/test_enclave/target/release/deps/test_enclave.test_enclave.92037451-cgu.5.rcgu.o" "/root/tee/test_enclave/target/release/deps/test_enclave.test_enclave.92037451-cgu.6.rcgu.o" "/root/tee/test_enclave/target/release/deps/test_enclave.4n1ard07vnfybl0u.rcgu.o" "-Wl,--as-needed" "-L" "/root/tee/test_enclave/target/release/deps" "-L" "/opt/intel/sgxsdk/sgxsdk/lib64" "-L" "/root/tee/test_enclave/target/release/build/sgx_backtrace_sys-def8748d2fb344cd/out/libbacktrace/" "-L" "/root/tee/test_enclave/target/release/build/sgx_backtrace_sys-def8748d2fb344cd/out/libbacktrace" "-L" "/root/tee/test_enclave/target/release/build/sgx_unwind-5967c78a3d058c31/out/libunwind/src/.libs" "-L" "/root/.rustup/toolchains/nightly-2022-10-22-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-lsgx_urts_sim" "-Wl,-Bstatic" "/root/tee/test_enclave/target/release/deps/libsgx_serialize-39d7c35c5b29adbf.rlib" "/root/tee/test_enclave/target/release/deps/libsgx_tstd-ff7f97719f252dac.rlib" "/root/.rustup/toolchains/nightly-2022-10-22-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-15accacd1251d941.rlib" "/root/.rustup/toolchains/nightly-2022-10-22-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-757bd6fa410f1121.rlib" "/root/.rustup/toolchains/nightly-2022-10-22-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-3e961d059b9bcde7.rlib" "/root/.rustup/toolchains/nightly-2022-10-22-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-a51843dfc5fc8b4b.rlib" "/root/tee/test_enclave/target/release/deps/libsgx_tprotected_fs-1c6b8194cd995c38.rlib" "/root/tee/test_enclave/target/release/deps/libsgx_trts-93b731bcc2afaa7c.rlib" "/root/tee/test_enclave/target/release/deps/libsgx_libc-1f386b5358127e6c.rlib" "/root/tee/test_enclave/target/release/deps/libsgx_types-8c0737556bb8ff2c.rlib" "/root/tee/test_enclave/target/release/deps/libsgx_alloc-f76a2f294a589f87.rlib" "/root/tee/test_enclave/target/release/deps/libsgx_unwind-a53ff9a3f3274575.rlib" "/root/tee/test_enclave/target/release/deps/libhashbrown_tstd-59ec94415a526a28.rlib" "/root/.rustup/toolchains/nightly-2022-10-22-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-c6c03e024a2f1e46.rlib"
# "/root/.rustup/toolchains/nightly-2022-10-22-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-522518611024dce5.rlib
# " "/root/.rustup/toolchains/nightly-2022-10-22-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-05898138a596088a.rlib" "/root/.rustup/toolchains/nightly-2022-10-22-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-b7c79d85cf21a511.rlib" "-Wl,-Bdynamic" "-lsgx_tstdc" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-lsgx_trts" "-lsgx_pthread" "-lsgx_trts" "-lsgx_tstdc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/root/.rustup/toolchains/nightly-2022-10-22-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/root/tee/test_enclave/target/release/deps/libtest_enclave.so" "-Wl,--gc-sections" "-shared" "-Wl,-zrelro,-znow" "-Wl,-O1" "-nodefaultlibs"
Loading