5626056ffb
to avoid accidents when debugging with 'sh -x'. * grub-core/gensyminfo.sh.in: Likewise. * tests/example_scripted_test.in: Likewise. * tests/grub_cmd_regexp.in: Likewise. * tests/grub_script_blanklines.in: Likewise. * tests/grub_script_dollar.in: Likewise. * tests/grub_script_expansion.in: Likewise. * tests/grub_script_final_semicolon.in: Likewise. * tests/partmap_test.in: Likewise. * tests/util/grub-shell-tester.in: Likewise. * tests/util/grub-shell.in: Likewise.
35 lines
979 B
Bash
35 lines
979 B
Bash
#! /bin/sh
|
|
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_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"
|