From: H.J. Lu Date: Mon, 17 Dec 2012 14:53:35 +0000 (+0000) Subject: Add a testcase for PR ld/14962 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=06fc0e223849b3d37b5288f605a2f3b97cf684c4;p=binutils-gdb.git Add a testcase for PR ld/14962 PR ld/14962 * ld-elf/var1.d: New file. * ld-elf/var1.s: Likewise. * ld-elf/var1.t: Likewise. --- diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 7a2cb17f2a7..9350540ef30 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2012-12-17 H.J. Lu + + PR ld/14962 + * ld-elf/var1.d: New file. + * ld-elf/var1.s: Likewise. + * ld-elf/var1.t: Likewise. + 2012-12-16 H.J. Lu PR ld/14968 diff --git a/ld/testsuite/ld-elf/var1.d b/ld/testsuite/ld-elf/var1.d new file mode 100644 index 00000000000..4ddfec3c887 --- /dev/null +++ b/ld/testsuite/ld-elf/var1.d @@ -0,0 +1,10 @@ +#ld: $srcdir/$subdir/var1.t --sort-section name +#nm: -n + +#... +0[0-9a-f]* D var1 +#... +0[0-9a-f]* A var2 +#... +0[0-9a-f]* D var3 +#pass diff --git a/ld/testsuite/ld-elf/var1.s b/ld/testsuite/ld-elf/var1.s new file mode 100644 index 00000000000..6e2258beaad --- /dev/null +++ b/ld/testsuite/ld-elf/var1.s @@ -0,0 +1,31 @@ + .globl main + .globl start + .globl _start + .globl __start + .text +main: +start: +_start: +__start: + .byte 0 + .globl var3 + .section .data.var3,"aw",%progbits + .align 4 + .type var3, %object + .size var3, 4 +var3: + .zero 4 + .globl var2 + .section .data.var2,"aw",%progbits + .align 16 + .type var2, %object + .size var2, 16 +var2: + .zero 16 + .globl var1 + .section .data.var1,"aw",%progbits + .align 4 + .type var1, %object + .size var1, 4 +var1: + .zero 4 diff --git a/ld/testsuite/ld-elf/var1.t b/ld/testsuite/ld-elf/var1.t new file mode 100644 index 00000000000..6b9502c349d --- /dev/null +++ b/ld/testsuite/ld-elf/var1.t @@ -0,0 +1 @@ +var2 = var2 + 3;