+2002-07-09 Richard Sandiford <rsandifo@redhat.com>
+
+ * ld-scripts/dynamic-sections*: New test.
+
2002-07-09 Hans-Peter Nilsson <hp@axis.com>
* ld-cris/libdso-3.d, ld-cris/dso-3.s, ld-cris/noglob1.s,
--- /dev/null
+ .data
+ .4byte foo
--- /dev/null
+ .data
+ .global foo
+foo: .4byte 0
--- /dev/null
+# nm: -C
+# ld: -T dynamic-sections.t
+# name: dynamic sections
+# source: dynamic-sections-1.s
+# source: dynamic-sections-2.s
+#pass
--- /dev/null
+# Check for bug introduced on 2002-06-10. See dynamic-sections.t for
+# more details
+
+if ![is_elf_format] {
+ return
+}
+
+run_dump_test dynamic-sections
--- /dev/null
+SECTIONS
+{
+ .data : { *(.data) }
+ .rodata : { *(.rodata) }
+
+ /* The .rel* sections are typically placed here, because of the way
+ elf32.em handles orphaned sections. A bug introduced on 2002-06-10
+ would cause . to be 0 at this point. */
+
+ _bar = ASSERT (. > 0, "Bad . value");
+}