[PATCH] ld ifunc tests: make a bit more flexible

Mike Frysinger vapier@gentoo.org
Fri Jul 27 16:20:00 GMT 2012


This replaces some addresses in the x86-64 ifunc tests with patterns as I
don't think this impacts the result of the test -- we just care about the way
the call is made, not the specific address it happened to be linked at.

ld/testsuite/:
2012-07-27  Mike Frysinger  <vapier@gentoo.org>

	* ld-ifunc/ifunc-2-local-x86-64.d: Change 0x220 to 0x[a-f0-9]+.
	* ld-ifunc/ifunc-2-x86-64.d: Likewise.

--- binutils/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.d
+++ binutils/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.d
@@ -4,6 +4,6 @@
 #target: x86_64-*-*
 
 #...
-[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x220@plt>
-[ \t0-9a-f]+:[ \t0-9a-f]+lea[ \t]+.*\(%rip\),%rax.*[ \t0-9a-fq]+<\*ABS\*\+0x220@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x[a-f0-9]+@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+lea[ \t]+.*\(%rip\),%rax.*[ \t0-9a-fq]+<\*ABS\*\+0x[a-f0-9]+@plt>
 #pass
--- binutils/ld/testsuite/ld-ifunc/ifunc-2-x86-64.d
+++ binutils/ld/testsuite/ld-ifunc/ifunc-2-x86-64.d
@@ -4,6 +4,6 @@
 #target: x86_64-*-*
 
 #...
-[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x220@plt>
-[ \t0-9a-f]+:[ \t0-9a-f]+lea[ \t]+.*\(%rip\),%rax.*[ \t0-9a-fq]+<\*ABS\*\+0x220@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x[a-f0-9]+@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+lea[ \t]+.*\(%rip\),%rax.*[ \t0-9a-fq]+<\*ABS\*\+0x[a-f0-9]+@plt>
 #pass



More information about the Binutils mailing list