This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Make arm_unaligned_reloc test less sensitive to disassembler output format.


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ab3b14b04b35e4e9ee8bd8cdb38ef888f0922da5

commit ab3b14b04b35e4e9ee8bd8cdb38ef888f0922da5
Author: Doug Kwan <dougkwan@google.com>
Date:   Sun Jul 26 00:54:26 2015 -0700

    Make arm_unaligned_reloc test less sensitive to disassembler output format.

Diff:
---
 gold/ChangeLog                        |  5 +++++
 gold/testsuite/arm_unaligned_reloc.s  |  9 ++++++---
 gold/testsuite/arm_unaligned_reloc.sh | 22 +++++++++++-----------
 3 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/gold/ChangeLog b/gold/ChangeLog
index d7d849b..e533932 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,8 @@
+2015-07-26  Doug Kwan  <dougkwan@google.com>
+
+	* testsuite/arm_unaligned_reloc.{s,sh}: Make test less sensitive to
+	  disassembler output format.
+
 2015-07-23  Ian Coolidge  <icoolidge@google.com>
 	Plumb --pic-veneer option for gold.
 
diff --git a/gold/testsuite/arm_unaligned_reloc.s b/gold/testsuite/arm_unaligned_reloc.s
index f85297c..83bd03b 100644
--- a/gold/testsuite/arm_unaligned_reloc.s
+++ b/gold/testsuite/arm_unaligned_reloc.s
@@ -28,17 +28,20 @@ padding:
 	.type	abs32, %object
 	.size	abs32, 4
 abs32:
-	.word	x
+	# We use x + 1 instead so that addend is non-zero
+	# The disassembler sometimes skips repeating
+	# zeros and prints "..." instead.
+	.word	x + 1
 
 	.global	rel32
 	.type	rel32, %object
 	.size	rel32, 4
 rel32:
-	.word	x - .
+	.word	x + 1 - .
 
 	.global	abs16
 	.type	abs16, %object
 	.size	abs16, 2
 abs16:
-	.short	x
+	.short	x + 1
 	.short	0
diff --git a/gold/testsuite/arm_unaligned_reloc.sh b/gold/testsuite/arm_unaligned_reloc.sh
index d187453..75b0014 100755
--- a/gold/testsuite/arm_unaligned_reloc.sh
+++ b/gold/testsuite/arm_unaligned_reloc.sh
@@ -2,7 +2,7 @@
 
 # arm_unaligned_reloc.sh -- test ARM unaligned static data relocations.
 
-# Copyright (C) 2011-2015 Free Software Foundation, Inc.
+# Copyright (C) 2011-2014 Free Software Foundation, Inc.
 # Written by Doug Kwan <dougkwan@google.com>
 
 # This file is part of gold.
@@ -41,17 +41,17 @@ check()
 
 check arm_unaligned_reloc.stdout "^00009000 <x>:$"
 check arm_unaligned_reloc.stdout "^0000a001 <abs32>:$"
-check arm_unaligned_reloc.stdout "^    a001:	00009000 .*$"
+check arm_unaligned_reloc.stdout '^[	 ]*a001:[	 ]*00009001[	 ].*$'
 check arm_unaligned_reloc.stdout "^0000a005 <rel32>:"
-check arm_unaligned_reloc.stdout "^    a005:	ffffeffb .*$"
+check arm_unaligned_reloc.stdout "^[	 ]*a005:[	 ]*ffffeffc[	 ].*$"
 check arm_unaligned_reloc.stdout "^0000a009 <abs16>:"
-check arm_unaligned_reloc.stdout "^    a009:	00009000 .*$"
-
-check arm_unaligned_reloc_r.stdout "^   1:	00000000 .*$"
-check arm_unaligned_reloc_r.stdout "^[	]*1: R_ARM_ABS32	.data.0$"
-check arm_unaligned_reloc_r.stdout "^   5:	00000000 .*$"
-check arm_unaligned_reloc_r.stdout "^[	]*5: R_ARM_REL32	.data.0$"
-check arm_unaligned_reloc_r.stdout "^   9:	00000000 .*$"
-check arm_unaligned_reloc_r.stdout "^[	]*9: R_ARM_ABS16	.data.0$"
+check arm_unaligned_reloc.stdout "^[	 ]*a009:[	 ]*00009001[	 ].*$"
+
+check arm_unaligned_reloc_r.stdout "^[	 ]*1:[	 ]*00000001[	 ].*$"
+check arm_unaligned_reloc_r.stdout "^[	]*1: R_ARM_ABS32[	]*.data.0$"
+check arm_unaligned_reloc_r.stdout "^[	 ]*5:[	 ]*00000001[	 ].*$"
+check arm_unaligned_reloc_r.stdout "^[	]*5: R_ARM_REL32[	]*.data.0$"
+check arm_unaligned_reloc_r.stdout "^[	 ]*9:[	 ]*00000001[	 ].*$"
+check arm_unaligned_reloc_r.stdout "^[	]*9: R_ARM_ABS16[	]*.data.0$"
 
 exit 0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]