summaryrefslogtreecommitdiff
path: root/gold/testsuite/two_file_test_1.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-03-16 23:51:19 +0000
committerIan Lance Taylor <iant@google.com>2008-03-16 23:51:19 +0000
commite78b3cdac056ec0b4a0152fa4024277a79149e55 (patch)
tree0861ce017c9d41ccabe593fe36f0b44878adb3c7 /gold/testsuite/two_file_test_1.cc
parentd72860765a8a32c6391b56893fa01646933aa61e (diff)
downloadbinutils-redhat-e78b3cdac056ec0b4a0152fa4024277a79149e55.tar.gz
Fix handling of RELA relative relocs against local symbols in merge
sections.
Diffstat (limited to 'gold/testsuite/two_file_test_1.cc')
-rw-r--r--gold/testsuite/two_file_test_1.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/gold/testsuite/two_file_test_1.cc b/gold/testsuite/two_file_test_1.cc
index 2c3b9c9b0a..7646838cdb 100644
--- a/gold/testsuite/two_file_test_1.cc
+++ b/gold/testsuite/two_file_test_1.cc
@@ -47,6 +47,7 @@
// 14 Compare string constants in file 1 and file 2.
// 15 Compare wide string constants in file 1 and file 2.
// 16 Call a function directly after its address has been taken.
+// 17 File 1 checks array of string constants defined in file 2.
#include "two_file_test.h"
@@ -203,3 +204,18 @@ t16()
{
return f10() == 135;
}
+
+// 17 File 1 checks array of string constants defined in file 2.
+
+bool
+t17()
+{
+ char c = 'a';
+ for (int i = 0; i < T17_COUNT; ++i)
+ {
+ if (t17data[i][0] != c || t17data[i][1] != '\0')
+ return false;
+ ++c;
+ }
+ return true;
+}