Use my forked xmas-elf as a submodule
This commit is contained in:
parent
68d459975d
commit
757d3f2f4d
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -2,6 +2,10 @@
|
||||
path = deps/rust-sgx-sdk
|
||||
url = https://github.com/baidu/rust-sgx-sdk
|
||||
branch = master
|
||||
[submodule "deps/xmas-elf"]
|
||||
path = deps/xmas-elf
|
||||
url = http://github.com/tatetian/xmas-elf
|
||||
branch = master
|
||||
[submodule "deps/sgx_protect_file"]
|
||||
path = deps/sgx_protect_file
|
||||
url = https://github.com/tatetian/sgx_protect_file
|
||||
|
3
Makefile
3
Makefile
@ -2,10 +2,9 @@
|
||||
|
||||
all: build_src build_test
|
||||
|
||||
init:
|
||||
submodule:
|
||||
git submodule init
|
||||
git submodule update
|
||||
#cd deps/rust-sgx-sdk && git apply ../rust-sgx-sdk.patch
|
||||
cd deps/sgx_protect_file && make
|
||||
|
||||
build_src:
|
||||
|
1
deps/xmas-elf
vendored
Submodule
1
deps/xmas-elf
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 792105500ef80bdfe6f45ca6f64865121e4699c5
|
4
src/libos/Cargo.lock
generated
4
src/libos/Cargo.lock
generated
@ -6,7 +6,7 @@ dependencies = [
|
||||
"sgx_trts 1.0.1",
|
||||
"sgx_tstd 1.0.1",
|
||||
"sgx_types 1.0.1",
|
||||
"xmas-elf 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xmas-elf 0.6.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -80,7 +80,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
[[package]]
|
||||
name = "xmas-elf"
|
||||
version = "0.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"zero 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -94,5 +93,4 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
"checksum lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7"
|
||||
"checksum spin 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "37b5646825922b96b5d7d676b5bb3458a54498e96ed7b0ce09dc43a07038fea4"
|
||||
"checksum version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7716c242968ee87e5542f8021178248f267f295a5c4803beae8b8b7fd9bc6051"
|
||||
"checksum xmas-elf 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "22678df5df766e8d1e5d609da69f0c3132d794edf6ab5e75e7abcd2270d4cf58"
|
||||
"checksum zero 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5f1bc8a6b2005884962297587045002d8cfb8dcec9db332f4ca216ddc5de82c5"
|
||||
|
@ -7,13 +7,13 @@ name = "libos"
|
||||
crate-type = ["staticlib"]
|
||||
|
||||
[dependencies]
|
||||
xmas-elf = "0.6"
|
||||
lazy_static = { version = "1.1.0", features = ["spin_no_std"] } # Implies nightly
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
||||
[target.'cfg(not(target_env = "sgx"))'.dependencies]
|
||||
xmas-elf = { path = "../../deps/xmas-elf" }
|
||||
sgx_types = { path = "../../deps/rust-sgx-sdk/sgx_types" }
|
||||
sgx_tstd = { path = "../../deps/rust-sgx-sdk/sgx_tstd", features = ["backtrace"] }
|
||||
sgx_trts = { path = "../../deps/rust-sgx-sdk/sgx_trts" }
|
||||
|
@ -135,9 +135,12 @@ pub fn do_wait4(child_pid: u32, exit_code: &mut i32) -> Result<(), &'static str>
|
||||
*exit_code = guard.exit_code;
|
||||
break;
|
||||
}
|
||||
del_from_pid_table(guard.pid);
|
||||
drop(guard);
|
||||
}
|
||||
|
||||
let child_pid = child_process.lock().unwrap().pid;
|
||||
del_from_pid_table(child_pid);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,6 @@ char str_buf[] = "Hello World!\n";
|
||||
unsigned long str_size = sizeof(str_buf);
|
||||
|
||||
void _start(void) {
|
||||
//__rusgx_write(1, str_buf, str_size);
|
||||
__rusgx_write(1, str_buf, str_size);
|
||||
__rusgx_exit(0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user