summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-08-06 14:50:14 +0000
committerEric Andersen <andersen@codepoet.org>2002-08-06 14:50:14 +0000
commit99eb56df380e887832f121dc3680d4d7848a0050 (patch)
tree2e545f018301396cf3d291d2a7f1b3488a33cf2b
parent7711a9b8e870372e19f6bea41a70baa0ea2878dd (diff)
When symbols are missing, its supposed to be an error...
-Erik
-rwxr-xr-xextra/scripts/get-needed-libgcc-objects.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/extra/scripts/get-needed-libgcc-objects.sh b/extra/scripts/get-needed-libgcc-objects.sh
index 349279a70..1c4e7cf11 100755
--- a/extra/scripts/get-needed-libgcc-objects.sh
+++ b/extra/scripts/get-needed-libgcc-objects.sh
@@ -20,6 +20,7 @@ rm -f libc.ldr
$LD -r -o libc.ldr ../../lib/crt0.o ../../lib/crti.o ../../lib/crtn.o --whole-archive ../libc.a
if $NM --undefined-only libc.ldr | grep -v "^main$" | grep -v "^_GLOBAL_OFFSET_TABLE_$" > sym.need ; then
+ EXIT_WITH_ERROR=0
rm -f obj.need
touch obj.need
for SYM in `cat sym.need | sed -e 's/ U //g'` ; do
@@ -27,8 +28,10 @@ if $NM --undefined-only libc.ldr | grep -v "^main$" | grep -v "^_GLOBAL_OFFSET_T
$NM -s $LIBGCC | grep $SYM" in " | cut -d' ' -f3 >> obj.need
else
echo Symbol $SYM needed by libc.a but not found in libgcc.a
+ EXIT_WITH_ERROR=1
fi
done
+ exit $EXIT_WITH_ERROR
else
echo No missing symbols found.
exit 0