Add a testcase for PR ld/14052
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 5 May 2012 14:15:21 +0000 (14:15 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 5 May 2012 14:15:21 +0000 (14:15 +0000)
PR ld/14052
* ld-elf/pr14052.d: New file.
* ld-elf/pr14052.t: Likewise.

ld/testsuite/ChangeLog
ld/testsuite/ld-elf/pr14052.d [new file with mode: 0644]
ld/testsuite/ld-elf/pr14052.t [new file with mode: 0644]

index 534ed0df19703909684b103166a04cadca25c217..ae46fd0c5da60a696e036ed9008319e04a46f72a 100644 (file)
@@ -1,3 +1,9 @@
+2012-05-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/14052
+       * ld-elf/pr14052.d: New file.
+       * ld-elf/pr14052.t: Likewise.
+
 2012-05-05  Alan Modra  <amodra@gmail.com>
 
        PR ld/14052
diff --git a/ld/testsuite/ld-elf/pr14052.d b/ld/testsuite/ld-elf/pr14052.d
new file mode 100644 (file)
index 0000000..dc893a3
--- /dev/null
@@ -0,0 +1,8 @@
+#source: start.s
+#ld: -T pr14052.t
+#readelf: -s
+
+#failif
+#...
+ +[0-9]+: +[0-9a-f]+ +0 +(OBJECT|NOTYPE) +GLOBAL +DEFAULT +ABS _data_start
+#...
diff --git a/ld/testsuite/ld-elf/pr14052.t b/ld/testsuite/ld-elf/pr14052.t
new file mode 100644 (file)
index 0000000..360c231
--- /dev/null
@@ -0,0 +1,11 @@
+SECTIONS {
+       .text : {
+               *(.text)
+       }
+       . = ALIGN (0x1000);
+       .data : {
+               _data_start = .;
+               *(.data)
+       }
+       /DISCARD/ : { *(.*) }
+}