[AArch64][gas] Add support for Neoverse N1
[deliverable/binutils-gdb.git] / gold / testsuite / hidden_test.sh
index df51b37655142a90b5284ad0efc59d1305f2e5cf..d838039a1d07121b293f8a2bdccf621d65493b8b 100755 (executable)
@@ -2,7 +2,7 @@
 
 # hidden_test.sh -- a test case for hidden and internal symbols.
 
-# Copyright 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009-2019 Free Software Foundation, Inc.
 # Written by Cary Coutant <ccoutant@google.com>.
 
 # This file is part of gold.
 # error messages are issued for the references to internal and
 # hidden symbols.  The errors will be found in hidden_test.err.
 
-check()
+check_missing()
 {
-    if grep -q "$2" "$1"
+    if grep -q "$2" "$1"
     then
-       echo "Did not find expected error in $1:"
+       echo "Found unexpected error in $1:"
        echo "   $2"
        echo ""
        echo "Actual error output below:"
@@ -42,25 +42,29 @@ check()
     fi
 }
 
-check_missing()
+check_missing_sym()
 {
     if grep -q "$2" "$1"
     then
-       echo "Found unexpected error in $1:"
+       echo "Found unexpected symbol in $1:"
        echo "   $2"
        echo ""
-       echo "Actual error output below:"
+       echo "Actual nm output below:"
        cat "$1"
        exit 1
     fi
 }
 
-# We should see errors for hidden and internal symbols.
-check hidden_test.err "hidden symbol 'main_hidden' in hidden_test_main.o is referenced by DSO libhidden.so"
-check hidden_test.err "internal symbol 'main_internal' in hidden_test_main.o is referenced by DSO libhidden.so"
-
 # We shouldn't see errors for the default and protected symbols.
 check_missing hidden_test.err "main_default"
 check_missing hidden_test.err "main_protected"
 
+# We shouldn't see errors for the hidden and internal symbols either (PR 15574).
+check_missing hidden_test.err "main_hidden"
+check_missing hidden_test.err "main_internal"
+
+# We shouldn't see the hidden or internal symbols in the dynamic symbol table.
+check_missing_sym hidden_test.syms "main_hidden"
+check_missing_sym hidden_test.syms "main_internal"
+
 exit 0
This page took 0.025635 seconds and 4 git commands to generate.