From 0e6b97bb760749f75a6377a451fe52df3bf5e9b9 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 9 Oct 2009 13:32:50 +0000 Subject: [PATCH] 2009-10-09 H.J. Lu PR ld/10749 * ld-elf/relocatable.d: New. * ld-elf/relocatable.t: Likewise. * ld-elf/simple.s: Likewise. --- ld/testsuite/ChangeLog | 7 +++++++ ld/testsuite/ld-elf/relocatable.d | 9 +++++++++ ld/testsuite/ld-elf/relocatable.t | 8 ++++++++ ld/testsuite/ld-elf/simple.s | 4 ++++ 4 files changed, 28 insertions(+) create mode 100644 ld/testsuite/ld-elf/relocatable.d create mode 100644 ld/testsuite/ld-elf/relocatable.t create mode 100644 ld/testsuite/ld-elf/simple.s diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 43f5d1b0e54..4596f7567e6 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2009-10-09 H.J. Lu + + PR ld/10749 + * ld-elf/relocatable.d: New. + * ld-elf/relocatable.t: Likewise. + * ld-elf/simple.s: Likewise. + 2009-10-07 H.J. Lu PR ld/10744 diff --git a/ld/testsuite/ld-elf/relocatable.d b/ld/testsuite/ld-elf/relocatable.d new file mode 100644 index 00000000000..be4847aaf04 --- /dev/null +++ b/ld/testsuite/ld-elf/relocatable.d @@ -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 index 00000000000..2ec056ae338 --- /dev/null +++ b/ld/testsuite/ld-elf/relocatable.t @@ -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 index 00000000000..2834182aa06 --- /dev/null +++ b/ld/testsuite/ld-elf/simple.s @@ -0,0 +1,4 @@ + .text + .long 1 + .data + .long 2 -- 2.30.2