From a3293649cdf2585cbe25d9a742b84b2e7bd6111c Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 4 Apr 2011 16:36:29 +0000 Subject: Add a testcase for PR ld/12627. 2011-04-04 H.J. Lu PR ld/12627 * ld-i386/i386.exp: Run pr12627. * ld-i386/pr12627.d: New. * ld-i386/pr12627.s: Likewise. * ld-i386/pr12627.t: Likewise. --- ld/testsuite/ChangeLog | 9 +++++++++ ld/testsuite/ld-i386/i386.exp | 1 + ld/testsuite/ld-i386/pr12627.d | 8 ++++++++ ld/testsuite/ld-i386/pr12627.s | 11 +++++++++++ ld/testsuite/ld-i386/pr12627.t | 27 +++++++++++++++++++++++++++ 5 files changed, 56 insertions(+) create mode 100644 ld/testsuite/ld-i386/pr12627.d create mode 100644 ld/testsuite/ld-i386/pr12627.s create mode 100644 ld/testsuite/ld-i386/pr12627.t (limited to 'ld') diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 4d41d8c..ddbb461 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2011-04-04 H.J. Lu + + PR ld/12627 + * ld-i386/i386.exp: Run pr12627. + + * ld-i386/pr12627.d: New. + * ld-i386/pr12627.s: Likewise. + * ld-i386/pr12627.t: Likewise. + 2011-03-31 Bernd Schmidt * ld-scripts/crossref.exp: Add CFLAGS for tic6x*-*-*. diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index de8f892..ead0df1 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -201,3 +201,4 @@ if { !([istarget "i?86-*-linux*"] } run_dump_test "compressed1" +run_dump_test "pr12627" diff --git a/ld/testsuite/ld-i386/pr12627.d b/ld/testsuite/ld-i386/pr12627.d new file mode 100644 index 0000000..c097821 --- /dev/null +++ b/ld/testsuite/ld-i386/pr12627.d @@ -0,0 +1,8 @@ +#name: PR ld/12627 +#as: --32 +#ld: -melf_i386 -T pr12627.t +#nm: -n + +#... +0+100 A __bss16_dwords +#pass diff --git a/ld/testsuite/ld-i386/pr12627.s b/ld/testsuite/ld-i386/pr12627.s new file mode 100644 index 0000000..305dfd5 --- /dev/null +++ b/ld/testsuite/ld-i386/pr12627.s @@ -0,0 +1,11 @@ + .section ".text16","ax" + .globl _start +_start: + movl $__bss16_start, %edi + movl $__bss16_dwords, %ecx + xorl %eax, %eax + rep movsl + ret + + .section ".bss16","ax" + .space 1024 diff --git a/ld/testsuite/ld-i386/pr12627.t b/ld/testsuite/ld-i386/pr12627.t new file mode 100644 index 0000000..d824920 --- /dev/null +++ b/ld/testsuite/ld-i386/pr12627.t @@ -0,0 +1,27 @@ +OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") +OUTPUT_ARCH(i386) +EXTERN(_start) +ENTRY(_start) + +SECTIONS +{ + . = 0x1000; + + .bss16 (NOLOAD) : { + __bss16_start = .; + *(.bss16) + __bss16_end = .; + } + __bss16_len = __bss16_end - __bss16_start; + __bss16_dwords = (__bss16_len + 3) >> 2; + + . = 0x8000; + + .text16 : { + FILL(0x90909090) + __text16_start = .; + *(.text16) + *(.text16.*) + __text16_end = .; + } +} -- cgit v1.1