diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-08-13 05:41:37 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-08-13 05:41:37 -0700 |
commit | 34c4758cc210e2ca042b0373938e57fd6844f89d (patch) | |
tree | a0d556e180b3b103d8d113da24a332b88cf2758c /ld/testsuite/ld-i386 | |
parent | 6d545e31f520d42d921c6164ec592e8d7614d315 (diff) | |
download | gdb-34c4758cc210e2ca042b0373938e57fd6844f89d.zip gdb-34c4758cc210e2ca042b0373938e57fd6844f89d.tar.gz gdb-34c4758cc210e2ca042b0373938e57fd6844f89d.tar.bz2 |
ld: Restore linker scripts in PR ld/21884 tests
OUTPUT_FORMAT in linker script of PR ld/21884 tests is needed to trigger
PR ld/21884. Restore linker scripts and add nacl versions of the same
tests.
* testsuite/ld-i386/i386.exp: Run pr21884-nacl.
* testsuite/ld-x86-64/x86-64.exp: Likewise.
* testsuite/ld-i386/pr21884.d: Don't run on nacl targets.
* testsuite/ld-x86-64/pr21884.d: Likewise.
* testsuite/ld-i386/pr21884.t: Revert the last change.
* testsuite/ld-x86-64/pr21884.t: Likewise.
* testsuite/ld-i386/pr21884-nacl.d: New file.
* testsuite/ld-i386/pr21884-nacl.t: Likewise.
* testsuite/ld-x86-64/pr21884-nacl.d: Likewise.
* testsuite/ld-x86-64/pr21884-nacl.t: Likewise.
Diffstat (limited to 'ld/testsuite/ld-i386')
-rw-r--r-- | ld/testsuite/ld-i386/i386.exp | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pr21884-nacl.d | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pr21884-nacl.t | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pr21884.d | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/pr21884.t | 4 |
5 files changed, 27 insertions, 0 deletions
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index 34f03e0..27d622e 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -438,6 +438,7 @@ run_dump_test "property-x86-shstk5" run_dump_test "pie1" run_dump_test "pie1-nacl" run_dump_test "pr21884" +run_dump_test "pr21884-nacl" if { !([istarget "i?86-*-linux*"] || [istarget "i?86-*-gnu*"] diff --git a/ld/testsuite/ld-i386/pr21884-nacl.d b/ld/testsuite/ld-i386/pr21884-nacl.d new file mode 100644 index 0000000..82daaaa --- /dev/null +++ b/ld/testsuite/ld-i386/pr21884-nacl.d @@ -0,0 +1,10 @@ +#source: dummy.s +#as: --32 +#ld: -m elf_i386 -T pr21884-nacl.t -b binary +#objdump: -b binary -s +#target: i?86-*-nacl* x86_64-*-nacl* + +.*: file format binary + +Contents of section .data: +#pass diff --git a/ld/testsuite/ld-i386/pr21884-nacl.t b/ld/testsuite/ld-i386/pr21884-nacl.t new file mode 100644 index 0000000..3ffb56c --- /dev/null +++ b/ld/testsuite/ld-i386/pr21884-nacl.t @@ -0,0 +1,11 @@ +OUTPUT_FORMAT("elf32-i386-nacl"); +OUTPUT_ARCH(i386); + +ENTRY(_start); +SECTIONS { + . = 0x10000; + _start = . ; + .data : { + *(.data) + } +} diff --git a/ld/testsuite/ld-i386/pr21884.d b/ld/testsuite/ld-i386/pr21884.d index dc212d3..ea73aa2 100644 --- a/ld/testsuite/ld-i386/pr21884.d +++ b/ld/testsuite/ld-i386/pr21884.d @@ -2,6 +2,7 @@ #as: --32 #ld: -m elf_i386 -T pr21884.t -b binary #objdump: -b binary -s +#notarget: i?86-*-nacl* x86_64-*-nacl* .*: file format binary diff --git a/ld/testsuite/ld-i386/pr21884.t b/ld/testsuite/ld-i386/pr21884.t index fcb7bce..4cf8cdc 100644 --- a/ld/testsuite/ld-i386/pr21884.t +++ b/ld/testsuite/ld-i386/pr21884.t @@ -1,3 +1,7 @@ +OUTPUT_FORMAT("elf32-i386"); +OUTPUT_ARCH(i386); + +ENTRY(_start); SECTIONS { . = 0x10000; _start = . ; |