Use __asm__ rather than asm in gold testsuite
[deliverable/binutils-gdb.git] / gold / testsuite / script_test_3.sh
index cddb69accfdc5f90c8c1d4364554bce24ef5ecac..026cd2c06070d4d211ea24e8e3c798286cda6427 100755 (executable)
@@ -2,7 +2,7 @@
 
 # script_test_3.sh -- test PHDRS
 
-# Copyright 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008-2020 Free Software Foundation, Inc.
 # Written by Ian Lance Taylor <iant@google.com>.
 
 # This file is part of gold.
@@ -85,4 +85,18 @@ if test "$section_size" != "$segment_size"; then
   exit 1
 fi
 
+# At least one PT_LOAD segment should have an alignment >= 0x100000.
+found=no
+for a in `grep LOAD script_test_3.stdout | sed -e 's/^.* 0x/0x/'`; do
+  script="BEGIN { if ($a >= 0x100000) { print \"true\" } else { print \"false\" } }"
+  x=`awk "$script" < /dev/null`
+  if test "$x" = "true"; then
+    found=yes
+  fi
+done
+if test "$found" = "no"; then
+  echo "no LOAD segment has required alignment"
+  exit 1
+fi
+
 exit 0
This page took 0.0238 seconds and 4 git commands to generate.