File: gensyminfo.sh.in

package info (click to toggle)
grub2 2.02+dfsg1-20
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 61,784 kB
  • sloc: ansic: 384,086; asm: 16,323; sh: 13,230; cpp: 1,994; makefile: 1,488; python: 1,458; sed: 423; lex: 393; yacc: 267; awk: 75; lisp: 50; perl: 31
file content (37 lines) | stat: -rw-r--r-- 1,278 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#! /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_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"