[syslinux:elflink] elflink: Warn about unresolved symbols when creating modules.dep
syslinux-bot for Matt Fleming
matt.fleming at linux.intel.com
Thu Feb 17 16:00:18 PST 2011
Commit-ID: a7ded880aa0f475ba6fdf1f70db690d1ccf9e31d
Gitweb: http://syslinux.zytor.com/commit/a7ded880aa0f475ba6fdf1f70db690d1ccf9e31d
Author: Matt Fleming <matt.fleming at linux.intel.com>
AuthorDate: Thu, 17 Feb 2011 22:03:26 +0000
Committer: H. Peter Anvin <hpa at linux.intel.com>
CommitDate: Thu, 17 Feb 2011 15:59:48 -0800
elflink: Warn about unresolved symbols when creating modules.dep
If, after running elf_gen_dep.sh, there are still some symbols that
are not provided by any of the modules that we built, issue a warning
and list the unresolved symbols.
Signed-off-by: Matt Fleming <matt.fleming at linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa at linux.intel.com>
---
elf_gen_dep.sh | 22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/elf_gen_dep.sh b/elf_gen_dep.sh
index 306034a..404ebbe 100755
--- a/elf_gen_dep.sh
+++ b/elf_gen_dep.sh
@@ -71,9 +71,20 @@ resolve_sym ()
while read symbol
do
- #echo $symbol
- sed -n -e "s/^$symbol <\(.*\)>/\1/p" all.txt >> resolve.tmp
- #grep $symbol all.txt
+ # If no one provides the symbol we're trying to
+ # resolve then add it to the list of unresolved
+ # symbols.
+ grep -q $symbol all.txt
+ if [ $? -ne 0 ]; then
+ # We only need to add the symbol once
+ if [[ ! "$unresolved_symbols" =~ "$symbol" ]]; then
+ unresolved_symbols="$unresolved_symbols $symbol"
+ fi
+ else
+ #echo $symbol
+ sed -n -e "s/^$symbol <\(.*\)>/\1/p" all.txt >> resolve.tmp
+ #grep $symbol all.txt
+ fi
done
rm_cr < resolve.tmp
@@ -108,4 +119,9 @@ done
rm *.txt
rm *.ext
rm *.int
+
+if [ "$unresolved_symbols" ]; then
+ echo "WARNING: These symbols could not be resolved:" $unresolved_symbols
+fi
+
echo ELF modules dependency is bult up, pls check modules.dep!
More information about the Syslinux-commits
mailing list