diff options
Diffstat (limited to 'ld/testsuite/ld-i386')
-rw-r--r-- | ld/testsuite/ld-i386/discarded1.d | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/discarded1.s | 13 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/discarded1.t | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-i386/i386.exp | 1 |
4 files changed, 24 insertions, 0 deletions
diff --git a/ld/testsuite/ld-i386/discarded1.d b/ld/testsuite/ld-i386/discarded1.d new file mode 100644 index 0000000..8106db3 --- /dev/null +++ b/ld/testsuite/ld-i386/discarded1.d @@ -0,0 +1,3 @@ +#as: --32 +#ld: -melf_i386 -T discarded1.t +#error: .*discarded output section: `.got.plt' diff --git a/ld/testsuite/ld-i386/discarded1.s b/ld/testsuite/ld-i386/discarded1.s new file mode 100644 index 0000000..9b20c87 --- /dev/null +++ b/ld/testsuite/ld-i386/discarded1.s @@ -0,0 +1,13 @@ + .text +.globl _start + .type _start, @function +_start: + movl x@GOT(%ecx), %eax + .size _start, .-_start +.globl x + .data + .align 4 + .type x, @object + .size x, 4 +x: + .long 2 diff --git a/ld/testsuite/ld-i386/discarded1.t b/ld/testsuite/ld-i386/discarded1.t new file mode 100644 index 0000000..a4d617f --- /dev/null +++ b/ld/testsuite/ld-i386/discarded1.t @@ -0,0 +1,7 @@ +ENTRY(_start) +SECTIONS +{ + .text : {*(.text)} + .data : {*(.data)} + /DISCARD/ : {*(*)} +} diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index 850713a..86ba9e4 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -190,6 +190,7 @@ run_dump_test "protected2" run_dump_test "protected3" run_dump_test "tlspie1" run_dump_test "nogot1" +run_dump_test "discarded1" if { !([istarget "i?86-*-linux*"] || [istarget "x86_64-*-linux*"]) } { |