aboutsummaryrefslogtreecommitdiff
path: root/gold/testsuite
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@gmail.com>2016-06-23 09:45:25 -0700
committerCary Coutant <ccoutant@gmail.com>2016-06-23 09:45:25 -0700
commit3ca25b560af813ca576821b500a0f0885829b500 (patch)
tree6c6b394becd0a8da3259ccb807460f420fce7220 /gold/testsuite
parent2ec060b71cc1cddb506d3a38475aadc184e25985 (diff)
downloadgdb-3ca25b560af813ca576821b500a0f0885829b500.zip
gdb-3ca25b560af813ca576821b500a0f0885829b500.tar.gz
gdb-3ca25b560af813ca576821b500a0f0885829b500.tar.bz2
Fix bug with grouping sections.
The fix for PR 15370 did not correctly check all patterns in a group, but instead threw all unassigned sections into the group. This patch fixes that. 2016-06-23 Cary Coutant <ccoutant@gmail.com> Igor Kudrin <ikudrin@accesssoftek.com> gold/ PR gold/15370 * script-sections.cc (Output_section_element_input::set_section_addresses): Keep bin_count separate from input_pattern_count. * testsuite/script_test_12.t: Add another section .x4. * testsuite/script_test_12i.t: Likewise. * testsuite/script_test_12a.c: Likewise. * testsuite/script_test_12b.c: Likewise.
Diffstat (limited to 'gold/testsuite')
-rw-r--r--gold/testsuite/script_test_12.t1
-rw-r--r--gold/testsuite/script_test_12a.c1
-rw-r--r--gold/testsuite/script_test_12b.c1
-rw-r--r--gold/testsuite/script_test_12i.t1
4 files changed, 4 insertions, 0 deletions
diff --git a/gold/testsuite/script_test_12.t b/gold/testsuite/script_test_12.t
index d434f20..4579c58 100644
--- a/gold/testsuite/script_test_12.t
+++ b/gold/testsuite/script_test_12.t
@@ -57,6 +57,7 @@ SECTIONS
test_array_start = .;
*(.x1 .x2 .x3);
test_array_end = .;
+ *(.x4);
}
.bss : { *(.bss) }
diff --git a/gold/testsuite/script_test_12a.c b/gold/testsuite/script_test_12a.c
index 0eed0c2..ed1be68 100644
--- a/gold/testsuite/script_test_12a.c
+++ b/gold/testsuite/script_test_12a.c
@@ -73,3 +73,4 @@ main(void)
int a1[] __attribute((section(".x1"))) = { 0x01, 0x02, 0x03, 0x04 };
int a2[] __attribute((section(".x2"))) = { 0x11, 0x12, 0x13, 0x14};
int a3[] __attribute((section(".x3"))) = { 0x21, 0x22, 0x23, 0x24 };
+int a4[] __attribute((section(".x4"))) = { 0xff, 0xff, 0xff, 0xff };
diff --git a/gold/testsuite/script_test_12b.c b/gold/testsuite/script_test_12b.c
index a69866e..e31f73d 100644
--- a/gold/testsuite/script_test_12b.c
+++ b/gold/testsuite/script_test_12b.c
@@ -1,3 +1,4 @@
int b1[] __attribute((section(".x1"))) = { 0x85, 0x86, 0x87, 0x88 };
int b2[] __attribute((section(".x2"))) = { 0x95, 0x96, 0x97, 0x98 };
int b3[] __attribute((section(".x3"))) = { 0xa5, 0xa6, 0xa7, 0xa8 };
+int b4[] __attribute((section(".x4"))) = { 0xff, 0xff, 0xff, 0xff };
diff --git a/gold/testsuite/script_test_12i.t b/gold/testsuite/script_test_12i.t
index 8d6183a..af19cd6 100644
--- a/gold/testsuite/script_test_12i.t
+++ b/gold/testsuite/script_test_12i.t
@@ -57,6 +57,7 @@ SECTIONS
test_array_start = .;
*(.x1) *(.x2) *(.x3)
test_array_end = .;
+ *(.x4);
}
.bss : { *(.bss) }