aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Comstedt2011-01-07 16:25:05 +0000
committerMarcus Comstedt2011-01-07 16:25:05 +0000
commit176be9adaddaf3ff48d3cb046e221b3984c6725e (patch)
treeb4ece7f29d4d67e59bc40820aa33b63869983b05
parent31ffb399391fe6d557e53a554e9aed5656491768 (diff)
downloadscummvm-rg350-176be9adaddaf3ff48d3cb046e221b3984c6725e.tar.gz
scummvm-rg350-176be9adaddaf3ff48d3cb046e221b3984c6725e.tar.bz2
scummvm-rg350-176be9adaddaf3ff48d3cb046e221b3984c6725e.zip
DC: Ensure creation of output sections .{c,d}tors
Add an object with an empty .ctors and .dtors section to the build of each plugin. This ensures that there will be an output section .ctors and one .dtors in the output file (they could be empty though). If these output sections were to be removed, the symbols defined inside by the linker script could disappear as well, and we don't want that. svn-id: r55149
-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
'