aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2006-08-08 15:07:16 +0000
committerH.J. Lu <hjl.tools@gmail.com>2006-08-08 15:07:16 +0000
commit0d0999db2fc508c13cb6b9a7d4edef119d2c2d8d (patch)
treec430302873371c9cc5a912a26b3648abacaaea8a /ld
parentaa8a70744d67552f59f23834bc7d3d5cd888127b (diff)
downloadgdb-0d0999db2fc508c13cb6b9a7d4edef119d2c2d8d.zip
gdb-0d0999db2fc508c13cb6b9a7d4edef119d2c2d8d.tar.gz
gdb-0d0999db2fc508c13cb6b9a7d4edef119d2c2d8d.tar.bz2
ld/
2006-08-08 H.J. Lu <hongjiu.lu@intel.com> PR ld/3009 * ldlang.c (update_wild_statements): Update the whole wild section list. ld/testsuite/ 2006-08-08 H.J. Lu <hongjiu.lu@intel.com> PR ld/3009 * ld-scripts/sort.t: New file. * ld-scripts/sort_b_a-1.d: Likewise. * ld-scripts/sort_b_a-1.s: Likewise. * ld-scripts/sort_b_n-1.d: Likewise. * ld-scripts/sort_b_n-1.s: Likewise.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog6
-rw-r--r--ld/ldlang.c3
-rw-r--r--ld/testsuite/ChangeLog9
-rw-r--r--ld/testsuite/ld-scripts/sort.t5
-rw-r--r--ld/testsuite/ld-scripts/sort_b_a-1.d9
-rw-r--r--ld/testsuite/ld-scripts/sort_b_a-1.s16
-rw-r--r--ld/testsuite/ld-scripts/sort_b_n-1.d9
-rw-r--r--ld/testsuite/ld-scripts/sort_b_n-1.s12
8 files changed, 68 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 6273fbf..39d7d1f 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2006-08-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3009
+ * ldlang.c (update_wild_statements): Update the whole wild
+ section list.
+
2006-08-04 Nick Clifton <nickc@redhat.com>
Mike Frysinger <michael.frysinger@analog.com>
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 73d4053..51dfe36 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -3157,7 +3157,8 @@ update_wild_statements (lang_statement_union_type *s)
case lang_wild_statement_enum:
sec = s->wild_statement.section_list;
- if (sec != NULL)
+ for (sec = s->wild_statement.section_list; sec != NULL;
+ sec = sec->next)
{
switch (sec->spec.sorted)
{
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 92675883..de2f8a0 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2006-08-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3009
+ * ld-scripts/sort.t: New file.
+ * ld-scripts/sort_b_a-1.d: Likewise.
+ * ld-scripts/sort_b_a-1.s: Likewise.
+ * ld-scripts/sort_b_n-1.d: Likewise.
+ * ld-scripts/sort_b_n-1.s: Likewise.
+
2006-08-05 Pedro Alves <pedro_alves@portugalmail.pt>
* ld-pe/pe.exp: Enable tests on arm-wince-pe.
diff --git a/ld/testsuite/ld-scripts/sort.t b/ld/testsuite/ld-scripts/sort.t
new file mode 100644
index 0000000..c53481f
--- /dev/null
+++ b/ld/testsuite/ld-scripts/sort.t
@@ -0,0 +1,5 @@
+SECTIONS
+{
+ .text : {*(.text .text.*)}
+ /DISCARD/ : { *(.*) }
+}
diff --git a/ld/testsuite/ld-scripts/sort_b_a-1.d b/ld/testsuite/ld-scripts/sort_b_a-1.d
new file mode 100644
index 0000000..eaa917d
--- /dev/null
+++ b/ld/testsuite/ld-scripts/sort_b_a-1.d
@@ -0,0 +1,9 @@
+#source: sort_b_a-1.s
+#ld: -T sort.t --sort-section alignment
+#name: --sort-section alignment
+#nm: -n
+
+0[0-9a-f]* t text3
+0[0-9a-f]* t text1
+0[0-9a-f]* t text
+0[0-9a-f]* t text2
diff --git a/ld/testsuite/ld-scripts/sort_b_a-1.s b/ld/testsuite/ld-scripts/sort_b_a-1.s
new file mode 100644
index 0000000..87d3613
--- /dev/null
+++ b/ld/testsuite/ld-scripts/sort_b_a-1.s
@@ -0,0 +1,16 @@
+ .section .text.2
+ .p2align 3
+text2:
+ .long 0
+ .section .text.3
+ .p2align 6
+text3:
+ .long 0
+ .section .text.1
+ .p2align 5
+text1:
+ .long 0
+ .text
+text:
+ .p2align 4
+ .long 0
diff --git a/ld/testsuite/ld-scripts/sort_b_n-1.d b/ld/testsuite/ld-scripts/sort_b_n-1.d
new file mode 100644
index 0000000..42bdcf9
--- /dev/null
+++ b/ld/testsuite/ld-scripts/sort_b_n-1.d
@@ -0,0 +1,9 @@
+#source: sort_b_n-1.s
+#ld: -T sort.t --sort-section name
+#name: --sort-section name
+#nm: -n
+
+0[0-9a-f]* t text
+0[0-9a-f]* t text1
+0[0-9a-f]* t text2
+0[0-9a-f]* t text3
diff --git a/ld/testsuite/ld-scripts/sort_b_n-1.s b/ld/testsuite/ld-scripts/sort_b_n-1.s
new file mode 100644
index 0000000..5a49170
--- /dev/null
+++ b/ld/testsuite/ld-scripts/sort_b_n-1.s
@@ -0,0 +1,12 @@
+ .section .text.2
+text2:
+ .long 0
+ .section .text.3
+text3:
+ .long 0
+ .section .text.1
+text1:
+ .long 0
+ .text
+text:
+ .long 0