This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH]: Gold testsuite fixes
- From: David Miller <davem at davemloft dot net>
- To: binutils at sourceware dot org
- Date: Thu, 10 Apr 2008 17:11:51 -0700 (PDT)
- Subject: [PATCH]: Gold testsuite fixes
This implements the testsuite fixups needed for sparc, which were
discussed the other day.
2008-04-10 David S. Miller <davem@davemloft.net>
* testsuite/justsyms.t: Start at 0x100.
* testsuite/justsyms_1.cc: Adjust justsyms_string assertion.
* script_test_2b.cc (script_test_string_b): Make 8 bytes long.
* script_test_2.cc: Adjust string and section length checks.
Index: testsuite/justsyms.t
===================================================================
RCS file: /cvs/src/src/gold/testsuite/justsyms.t,v
retrieving revision 1.1
diff -u -p -r1.1 justsyms.t
--- testsuite/justsyms.t 7 Feb 2008 01:51:25 -0000 1.1
+++ testsuite/justsyms.t 11 Apr 2008 00:01:37 -0000
@@ -23,7 +23,7 @@
SECTIONS
{
/* This script is only used for a .o file. */
- . = 0x10000;
+ . = 0x100;
.gold_test : { *(.gold_test) }
.text : { *(.text) }
.data : { *(.data) }
Index: testsuite/justsyms_1.cc
===================================================================
RCS file: /cvs/src/src/gold/testsuite/justsyms_1.cc,v
retrieving revision 1.1
diff -u -p -r1.1 justsyms_1.cc
--- testsuite/justsyms_1.cc 7 Feb 2008 01:51:25 -0000 1.1
+++ testsuite/justsyms_1.cc 11 Apr 2008 00:01:37 -0000
@@ -44,7 +44,7 @@ main(int, char**)
{
// The linker script should arrange for this symbol to be exactly at
// address 0x10000.
- assert(reinterpret_cast<uintptr_t>(justsyms_string) == 0x10000);
+ assert(reinterpret_cast<uintptr_t>(justsyms_string) == 0x100);
// However, since the file was linked with --just-symbols, we should
// not be able to actually access the symbol.
Index: testsuite/script_test_2.cc
===================================================================
RCS file: /cvs/src/src/gold/testsuite/script_test_2.cc,v
retrieving revision 1.1
diff -u -p -r1.1 script_test_2.cc
--- testsuite/script_test_2.cc 4 Feb 2008 05:43:05 -0000 1.1
+++ testsuite/script_test_2.cc 11 Apr 2008 00:01:37 -0000
@@ -46,7 +46,7 @@ main(int, char**)
// subalign should move it up to 0x20000020.
for (int i = 0; i < 16; ++i)
assert(start_test_area_1[i] == 0);
- assert(strcmp(start_test_area_1 + 16, "test b") == 0);
+ assert(strcmp(start_test_area_1 + 16, "test bb") == 0);
// Next the string from script_test_2a.o, after the subalign.
for (int i = 16 + 7; i < 48; ++i)
@@ -54,7 +54,7 @@ main(int, char**)
assert(strcmp(start_test_area_1 + 48, "test a") == 0);
// Move four bytes forward to start_data.
- assert(reinterpret_cast<uintptr_t>(start_test_area_1 + 48 + 7 + 4)
+ assert(reinterpret_cast<uintptr_t>(start_test_area_1 + 48 + 8 + 4)
== reinterpret_cast<uintptr_t>(start_data));
assert(memcmp(start_data, "\1\2\0\4\0\0\0\010\0\0\0\0\0\0\0", 15) == 0
|| memcmp(start_data, "\1\0\2\0\0\0\4\0\0\0\0\0\0\0\010", 15) == 0);
Index: testsuite/script_test_2b.cc
===================================================================
RCS file: /cvs/src/src/gold/testsuite/script_test_2b.cc,v
retrieving revision 1.1
diff -u -p -r1.1 script_test_2b.cc
--- testsuite/script_test_2b.cc 4 Feb 2008 05:43:05 -0000 1.1
+++ testsuite/script_test_2b.cc 11 Apr 2008 00:01:37 -0000
@@ -21,4 +21,4 @@
// MA 02110-1301, USA.
char script_test_string_b[] __attribute__ ((section(".gold_test"))) =
- "test b";
+ "test bb";