This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch][gold] Fix test in 64 bits
Chatting on IRC Ian noted that using -m32 is not safe and it is better
to change the test. This patch does that.
2010-09-08 Rafael Espindola <espindola@google.com>
* Makefile.am (memory_test.stdout): Run readelf with -W
* Makefile.in: Regenerate.
* testsuite/memory_test.sh: Make the regexps accept both 32 and 64 bit outputs.
Cheers,
--
Rafael Ãvila de EspÃndola
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
index 161b86a..eab0557 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -1787,7 +1787,7 @@ memory_test: memory_test.s
$(COMPILE) -c $< -o memory_test.o
$(LINK) -Bgcctestdir/ -nostartfiles -nostdlib -T $(srcdir)/memory_test.t -o $@ memory_test.o
memory_test.stdout: memory_test
- $(TEST_READELF) -lS $< > $@
+ $(TEST_READELF) -lWS $< > $@
endif GCC
endif NATIVE_LINKER
diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in
index 09dc84a..e40caa6 100644
--- a/gold/testsuite/Makefile.in
+++ b/gold/testsuite/Makefile.in
@@ -4487,7 +4487,7 @@ uninstall-am:
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -c $< -o memory_test.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) -Bgcctestdir/ -nostartfiles -nostdlib -T $(srcdir)/memory_test.t -o $@ memory_test.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@memory_test.stdout: memory_test
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) -lS $< > $@
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) -lWS $< > $@
@DEFAULT_TARGET_I386_TRUE@split_i386_1.o: split_i386_1.s
@DEFAULT_TARGET_I386_TRUE@ $(TEST_AS) -o $@ $<
@DEFAULT_TARGET_I386_TRUE@split_i386_2.o: split_i386_2.s
diff --git a/gold/testsuite/memory_test.sh b/gold/testsuite/memory_test.sh
index 8a223ad..8ff801e 100755
--- a/gold/testsuite/memory_test.sh
+++ b/gold/testsuite/memory_test.sh
@@ -36,13 +36,13 @@ check()
}
check memory_test.stdout \
- " LOAD 0x001000 0x00000000 0x00000000 0x00002 0x00002 R 0x1000"
+ " LOAD 0x001000 0x0*00000000 0x0*00000000 0x00000\?2 0x00000\?2 R 0x1000"
check memory_test.stdout \
- " LOAD 0x00112c 0x00001000 0x0000012c 0x00002 0x00002 R 0x1000"
+ " LOAD 0x00112c 0x0*00001000 0x0*0000012c 0x00000\?2 0x00000\?2 R 0x1000"
check memory_test.stdout \
- " LOAD 0x002000 0x00005000 0x00005000 0x00002 0x00002 R 0x1000"
+ " LOAD 0x002000 0x0*00005000 0x0*00005000 0x00000\?2 0x00000\?2 R 0x1000"
check memory_test.stdout \
- " LOAD 0x00203c 0x00004000 0x0000603c 0x0002a 0x0002a R E 0x1000"
+ " LOAD 0x00203c 0x0*00004000 0x0*0000603c 0x0000\?2a 0x0000\?2a R E 0x1000"
exit 0