From 3d3e6bc3f438c51ff235d6a454ee1010246e814a Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 14 Mar 2012 15:56:13 +0000 Subject: [PATCH] Add a testcase for PR ld/13839 2012-03-14 H.J. Lu PR ld/13839 * ld-elf/pr13839.d: New. * ld-elf/pr13839.s: Likewise. * ld-elf/pr13839.t: Likewise. --- ld/testsuite/ChangeLog | 7 +++++++ ld/testsuite/ld-elf/pr13839.d | 6 ++++++ ld/testsuite/ld-elf/pr13839.s | 10 ++++++++++ ld/testsuite/ld-elf/pr13839.t | 9 +++++++++ 4 files changed, 32 insertions(+) create mode 100644 ld/testsuite/ld-elf/pr13839.d create mode 100644 ld/testsuite/ld-elf/pr13839.s create mode 100644 ld/testsuite/ld-elf/pr13839.t diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 1e3c5c13848..a17d081b503 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2012-03-14 H.J. Lu + + PR ld/13839 + * ld-elf/pr13839.d: New. + * ld-elf/pr13839.s: Likewise. + * ld-elf/pr13839.t: Likewise. + 2012-03-09 H.J. Lu PR ld/13817 diff --git a/ld/testsuite/ld-elf/pr13839.d b/ld/testsuite/ld-elf/pr13839.d new file mode 100644 index 00000000000..fc63a90a0ad --- /dev/null +++ b/ld/testsuite/ld-elf/pr13839.d @@ -0,0 +1,6 @@ +#ld: -T pr13839.t +#nm: -n + +#... +[0-9a-f]+ T _text +#pass diff --git a/ld/testsuite/ld-elf/pr13839.s b/ld/testsuite/ld-elf/pr13839.s new file mode 100644 index 00000000000..3d132f68ddc --- /dev/null +++ b/ld/testsuite/ld-elf/pr13839.s @@ -0,0 +1,10 @@ + .text + .globl main + .globl start + .globl _start + .globl __start +main: +start: +_start: +__start: + .byte 0 diff --git a/ld/testsuite/ld-elf/pr13839.t b/ld/testsuite/ld-elf/pr13839.t new file mode 100644 index 00000000000..6baa2288193 --- /dev/null +++ b/ld/testsuite/ld-elf/pr13839.t @@ -0,0 +1,9 @@ +SECTIONS { + .text : { + _text = .; + *(.text) + } + _end = .; + /DISCARD/ : { *(.*) } +} +. = ASSERT((_end - _text <= (512 * 1024 * 1024)), "foo"); -- 2.30.2