      // Mark it initialized
      this_secs->attributes.flags |= SGX_FLAGS_INITTED;
  
-@@ -154,7 +276,7 @@
+@@ -154,7 +278,7 @@
  
      // `ce' is not checked against NULL, since it is not
      // allocated with new(std::no_throw).

+
+    // Invoke the registered signal handler.
+    {
+        std::lock_guard<std::mutex> lock(registered_signal_handlers_lock);
+        const auto it = registered_signal_handlers.find(signum);
+        if (it != registered_signal_handlers.end())
+        {
+            struct sigaction *act = it->second.get();
+            if ((!(act->sa_flags & SA_SIGINFO)) && act->sa_handler)

  `trts_nsp_internal` to allow for `-fno-stack-protector` to apply to just the
  one function for compilers that don't support
  `__attribute__((optimize(...)))`.
* Add support for accessing thread local storage (TLS) when registering
  signal handlers in `sdk/simulation/uinst/u_instructions.cpp`.

--
diff -Nur common/inc/internal/elfheader/elf_common.h common/inc/internal/elfheader/elf_common.h
