[Scummvm-git-logs] scummvm master -> 82bbadcf40bd11e82347656feeeeaf3c4d68198c
mikrosk
noreply at scummvm.org
Wed Oct 21 11:58:30 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
82bbadcf40 PLUGINS: Restore main executable's __dso_handle
Commit: 82bbadcf40bd11e82347656feeeeaf3c4d68198c
https://github.com/scummvm/scummvm/commit/82bbadcf40bd11e82347656feeeeaf3c4d68198c
Author: Miro Kropacek (miro.kropacek at gmail.com)
Date: 2026-10-21T21:57:44+10:00
Commit Message:
PLUGINS: Restore main executable's __dso_handle
This is a partial revert of commit 199a2b078e5, limited to
backends/plugins/elf/cxa-atexit.cpp.
As the comment explains, this is related to the main executable's symbol
definition, not plugin's.
Changed paths:
backends/plugins/elf/cxa-atexit.cpp
diff --git a/backends/plugins/elf/cxa-atexit.cpp b/backends/plugins/elf/cxa-atexit.cpp
index 9e8384bf048..74b75dc900b 100644
--- a/backends/plugins/elf/cxa-atexit.cpp
+++ b/backends/plugins/elf/cxa-atexit.cpp
@@ -54,6 +54,15 @@ static int s_count;
extern "C" {
+// GCC with -fuse-cxa-atexit registers the non-trivial destructors of objects
+// with static storage duration (namespace-scope and function-local) via
+// __cxa_atexit(..., &__dso_handle), so every TU containing such an object
+// references __dso_handle. It is normally provided by crtbegin.o; mintelf's
+// doesn't, so define it here for the main executable. Its address uniquely
+// identifies the main DSO. Plugins define their own via
+// PLUGIN_DYNAMIC_DSO_HANDLE in base/plugins.h.
+__attribute__((visibility("hidden"))) void *__dso_handle = &__dso_handle;
+
int __cxa_atexit(void (*destructor)(void *), void *arg, void *dso_handle) {
if (s_count >= CXA_ATEXIT_MAX) {
warning("elfloader: cxa-atexit table full (max=%d), dropping dtor %p dso=%p",
More information about the Scummvm-git-logs
mailing list