aboutsummaryrefslogtreecommitdiffstats
path: root/grub-core/gensyminfo.sh.in
diff options
context:
space:
mode:
authorJames <james.mckenzie@citrix.com>2012-11-16 10:41:01 +0000
committerJames <james.mckenzie@citrix.com>2012-11-16 10:41:01 +0000
commit041d1ea37802bf7178a31a53f96c26efa6b8fb7b (patch)
treec193e84ad1237f25a79d0f6a267722e44c73f56a /grub-core/gensyminfo.sh.in
downloadgrub-1.99-041d1ea37802bf7178a31a53f96c26efa6b8fb7b.tar.gz
grub-1.99-041d1ea37802bf7178a31a53f96c26efa6b8fb7b.tar.bz2
grub-1.99-041d1ea37802bf7178a31a53f96c26efa6b8fb7b.zip
fish
Diffstat (limited to 'grub-core/gensyminfo.sh.in')
-rw-r--r--grub-core/gensyminfo.sh.in34
1 files changed, 34 insertions, 0 deletions
diff --git a/grub-core/gensyminfo.sh.in b/grub-core/gensyminfo.sh.in
new file mode 100644
index 0000000..4f51849
--- /dev/null
+++ b/grub-core/gensyminfo.sh.in
@@ -0,0 +1,34 @@
+#! /bin/sh -e
+#
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This gensymlist.sh is free software; the author
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+#
+# Example:
+#
+# gensyms.sh normal.module
+#
+
+module=$1
+modname=`echo $module | sed -e 's@\.module.*$@@'`
+
+# Print all symbols defined by module
+if test x@TARGET_APPLE_CC@ = x1; then
+ @NM@ -g -P -p $module | \
+ grep -E '^[a-zA-Z0-9_]* [TDS]' | \
+ sed "s@^\([^ ]*\).*@defined $modname \1@g"
+else
+ @NM@ -g --defined-only -P -p $module | \
+ sed "s@^\([^ ]*\).*@defined $modname \1@g"
+fi
+
+# Print all undefined symbols used by module
+@NM@ -u -P -p $module | sed "s@^\([^ ]*\).*@undefined $modname \1@g"