# ver_test_4.sh -- test that version symbol is visible.
-# Copyright 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008-2019 Free Software Foundation, Inc.
# Written by Ian Lance Taylor <iant@google.com>.
# This file is part of gold.
check()
{
- if ! grep -q "$2" "$1"
+ if ! sed '/\.symtab/q' "$1" | grep -q "$2"
then
echo "Did not find expected symbol in $1:"
echo " $2"
echo ""
echo "Actual output below:"
- cat "$1"
+ sed '/\.symtab/q' "$1"
exit 1
fi
}
+check ver_test_4.syms "t1_2\$"
check ver_test_4.syms "t1_2@@VER2"
check ver_test_4.syms "t2_2@VER1"
check ver_test_4.syms "t2_2@@VER2"