From 710e41c3e8e55dfd643aa08752bb6565de1efe57 Mon Sep 17 00:00:00 2001 From: Marcus Comstedt Date: Fri, 7 Jan 2011 14:40:25 +0000 Subject: DC: Check plugins for required symbols Make sure that all the required symbols exist in generated plugins. If not, the strip command may have removed them... svn-id: r55144 --- backends/platform/dc/check_plugin_symbols | 15 +++++++++++++++ backends/platform/dc/dreamcast.mk | 1 + 2 files changed, 16 insertions(+) create mode 100755 backends/platform/dc/check_plugin_symbols (limited to 'backends') diff --git a/backends/platform/dc/check_plugin_symbols b/backends/platform/dc/check_plugin_symbols new file mode 100755 index 0000000000..7dd9d68971 --- /dev/null +++ b/backends/platform/dc/check_plugin_symbols @@ -0,0 +1,15 @@ +#! /bin/sh +case "$0" in + */*) dir=`dirname "$0"`/;; + *) dir="";; +esac +exec < "$dir"plugin.syms +while read sym; do + if sh-elf-nm "$1" | grep >/dev/null " $sym"'$'; then + : + else + echo >&2 "ERROR: Symbol $sym missing from $1" + exit 1 + fi +done +exit 0 diff --git a/backends/platform/dc/dreamcast.mk b/backends/platform/dc/dreamcast.mk index 5723418b59..2bea532b2e 100644 --- a/backends/platform/dc/dreamcast.mk +++ b/backends/platform/dc/dreamcast.mk @@ -14,6 +14,7 @@ plugin_dist : plugins if /usr/bin/test "$$p" -ot "$$t"; then :; else \ echo sh-elf-strip -g -o "$$t" "$$p"; \ sh-elf-strip -g -o "$$t" "$$p"; \ + $(srcdir)/backends/platform/dc/check_plugin_symbols "$$t"; \ fi;\ done -- cgit v1.2.3