2009-10-09 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 9 Oct 2009 13:32:50 +0000 (13:32 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 9 Oct 2009 13:32:50 +0000 (13:32 +0000)
PR ld/10749
* ld-elf/relocatable.d: New.
* ld-elf/relocatable.t: Likewise.
* ld-elf/simple.s: Likewise.

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

index 43f5d1b..4596f75 100644 (file)
@@ -1,3 +1,10 @@
+2009-10-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/10749
+       * ld-elf/relocatable.d: New.
+       * ld-elf/relocatable.t: Likewise.
+       * ld-elf/simple.s: Likewise.
+
 2009-10-07  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/10744
diff --git a/ld/testsuite/ld-elf/relocatable.d b/ld/testsuite/ld-elf/relocatable.d
new file mode 100644 (file)
index 0000000..be4847a
--- /dev/null
@@ -0,0 +1,9 @@
+#name: relocatable with script
+#source: simple.s
+#ld: -r -T relocatable.t
+#readelf: -S --wide
+
+#...
+  \[[ 0-9]+\] \.text.*[ \t]+PROGBITS[ \t]+0+800000[ \t0-9a-f]+AX.*
+  \[[ 0-9]+\] \.data.*[ \t]+PROGBITS[ \t]+0+900000[ \t0-9a-f]+WA.*
+#pass
diff --git a/ld/testsuite/ld-elf/relocatable.t b/ld/testsuite/ld-elf/relocatable.t
new file mode 100644 (file)
index 0000000..2ec056a
--- /dev/null
@@ -0,0 +1,8 @@
+SECTIONS
+{
+  . = 0x800000;
+  .text : { *(.text) }
+  . = 0x900000;
+  .data : { *(.data) }
+  /DISCARD/ : { *(.*) }
+}
diff --git a/ld/testsuite/ld-elf/simple.s b/ld/testsuite/ld-elf/simple.s
new file mode 100644 (file)
index 0000000..2834182
--- /dev/null
@@ -0,0 +1,4 @@
+       .text
+       .long   1
+       .data
+       .long   2