diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:29:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:29:51 +0000 |
commit | 6e7a315eb67cb6c113cf37e1d66c4f11a51a2b3e (patch) | |
tree | 32451fa3cdd9321fb2591fada9891b2cb70a9cd1 /grub-core/gensyminfo.sh.in | |
parent | Initial commit. (diff) | |
download | grub2-3e86199209a10ed6555e30b8b71884cb7cc45ed2.tar.xz grub2-3e86199209a10ed6555e30b8b71884cb7cc45ed2.zip |
Adding upstream version 2.06.upstream/2.06upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'grub-core/gensyminfo.sh.in')
-rw-r--r-- | grub-core/gensyminfo.sh.in | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/grub-core/gensyminfo.sh.in b/grub-core/gensyminfo.sh.in new file mode 100644 index 0000000..9bc7675 --- /dev/null +++ b/grub-core/gensyminfo.sh.in @@ -0,0 +1,37 @@ +#! @BUILD_SHEBANG@ +set -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_NMFLAGS_DEFINED_ONLY@" = x && test x"@TARGET_NMFLAGS_MINUS_P@" = x; then + @TARGET_NM@ -g -p $module | \ + sed -n "s@^\([0-9a-fA-F]*\) *[TBRDS] *\([^ ]*\).*@defined $modname \2@p" +elif test x"@TARGET_NMFLAGS_DEFINED_ONLY@" = x; then + @TARGET_NM@ -g @TARGET_NMFLAGS_MINUS_P@ -p $module | \ + sed -n "s@^\([^ ]*\) *[TBRDS] *\([0-9a-fA-F]*\).*@defined $modname \1@p" +else + @TARGET_NM@ -g --defined-only @TARGET_NMFLAGS_MINUS_P@ -p $module | \ + sed "s@^\([^ ]*\).*@defined $modname \1@g" +fi + +# Print all undefined symbols used by module +@TARGET_NM@ -u @TARGET_NMFLAGS_MINUS_P@ -p $module | sed "s@^\([^ ]*\).*@undefined $modname \1@g" |