aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/platform/dc/plugin_head.S6
-rwxr-xr-xconfigure4
2 files changed, 8 insertions, 2 deletions
diff --git a/backends/platform/dc/plugin_head.S b/backends/platform/dc/plugin_head.S
new file mode 100644
index 0000000000..6cbe9eec85
--- /dev/null
+++ b/backends/platform/dc/plugin_head.S
@@ -0,0 +1,6 @@
+
+ .section .ctors,"aw",@progbits
+ .section .dtors,"aw",@progbits
+
+ .end
+
diff --git a/configure b/configure
index eb75572b99..87d56c8ff7 100755
--- a/configure
+++ b/configure
@@ -2140,9 +2140,9 @@ _mak_plugins='
DYNAMIC_MODULES := 1
PLUGIN_PREFIX :=
PLUGIN_SUFFIX := .plg
-PLUGIN_EXTRA_DEPS = $(abspath $(srcdir)/backends/platform/dc/plugin.x $(srcdir)/backends/platform/dc/plugin.syms) $(EXECUTABLE)
+PLUGIN_EXTRA_DEPS = $(abspath $(srcdir)/backends/platform/dc/plugin.x $(srcdir)/backends/platform/dc/plugin.syms) $(EXECUTABLE) backends/platform/dc/plugin_head.o
CXXFLAGS += -DDYNAMIC_MODULES
-PLUGIN_LDFLAGS = -ml -m4-single-only -nostartfiles -Wl,-q,-T$(srcdir)/backends/platform/dc/plugin.x,--just-symbols,$(EXECUTABLE),--retain-symbols-file,$(srcdir)/backends/platform/dc/plugin.syms -L$(ronindir)/lib
+PLUGIN_LDFLAGS = -ml -m4-single-only -nostartfiles -Wl,-q,-T$(srcdir)/backends/platform/dc/plugin.x,--just-symbols,$(EXECUTABLE),--retain-symbols-file,$(srcdir)/backends/platform/dc/plugin.syms -L$(ronindir)/lib backends/platform/dc/plugin_head.o
PRE_OBJS_FLAGS := -Wl,--whole-archive
POST_OBJS_FLAGS := -Wl,--no-whole-archive
'