  
  #ifdef SE_SIM
  #include "t_instructions.h"    /* for `g_global_data_sim' */
-@@ -318,6 +320,31 @@
+@@ -318,6 +320,35 @@
      return 0;
  }
  

diff -Nur sdk/trts/trts_util.cpp sdk/trts/trts_util.cpp
--- sdk/trts/trts_util.cpp
+++ sdk/trts/trts_util.cpp
@@ -29,11 +29,19 @@
  *
  */
 

+int sgx_get_active_enclave_entries() {
+  return get_ecall_count();
+}
+
+void sgx_block_ecalls() { set_block_ecalls(/*block=*/true); }
+
+void sgx_unblock_ecalls() { set_block_ecalls(/*block=*/false); }
+
+sgx_status_t egetkey_status_to_sgx_status(int egetkey_status) {
+  switch ((egetkey_status_t)egetkey_status) {
