Skip to content
Draft
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
2 changes: 0 additions & 2 deletions intel-sgx/enclave-runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ documentation = "https://edp.fortanix.com/docs/api/enclave_runner/"
homepage = "https://edp.fortanix.com/"
keywords = ["sgx", "enclave"]
categories = ["os", "hardware-support"]
build = "build.rs"
exclude = ["fake-vdso/.gitignore", "fake-vdso/Makefile", "fake-vdso/main.S"]

[dependencies]
# Project dependencies
Expand Down
21 changes: 0 additions & 21 deletions intel-sgx/enclave-runner/build.rs

This file was deleted.

1 change: 0 additions & 1 deletion intel-sgx/enclave-runner/fake-vdso/.gitignore

This file was deleted.

11 changes: 0 additions & 11 deletions intel-sgx/enclave-runner/fake-vdso/Makefile

This file was deleted.

Binary file removed intel-sgx/enclave-runner/fake-vdso/fake-vdso.so
Binary file not shown.
8 changes: 0 additions & 8 deletions intel-sgx/enclave-runner/fake-vdso/main.S

This file was deleted.

3 changes: 2 additions & 1 deletion intel-sgx/enclave-runner/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#![allow(non_local_definitions)] // Required by failure
#![feature(raw_dylib_elf)]
#![allow(non_local_definitions, incomplete_features)] // Required by failure
#![deny(warnings)]
#![doc(
html_logo_url = "https://edp.fortanix.com/img/docs/edp-logo.svg",
Expand Down
17 changes: 5 additions & 12 deletions intel-sgx/enclave-runner/src/tcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ impl<T: Tcs> Usercall<T> {
}
}

#[link(name = "linux-vdso.so.1", kind = "raw-dylib", modifiers = "+verbatim")]
unsafe extern "C" {
fn __vdso_sgx_enter_enclave();
}

pub(crate) fn coenter<T: Tcs>(
tcs: T,
mut p1: u64,
Expand All @@ -67,18 +72,6 @@ pub(crate) fn coenter<T: Tcs>(
.weak __vdso_sgx_enter_enclave
.type __vdso_sgx_enter_enclave, function
mov __vdso_sgx_enter_enclave@GOTPCREL(%rip), {}
jmp 1f

// Strongly link to another symbol in the VDSO, so that the
// linker will include a DT_NEEDED entry for `linux-vdso.so.1`.
// This doesn't happen automatically because rustc passes
// `--as-needed` to the linker. This is never executed because
// of the unconditional jump above.
.global __vdso_clock_gettime
.type __vdso_clock_gettime, function
call __vdso_clock_gettime@PLT

1:
", out(reg) addr, options(nomem, nostack, att_syntax));
addr != 0
}
Expand Down
Loading