diff options
author | Rui Ueyama <ruiu@google.com> | 2016-09-02 20:40:53 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2016-09-02 20:40:53 +0000 |
commit | 66ba9f08b95cdfb36b41ab5fd6d830b5f67a3668 (patch) | |
tree | e46730f523e8cb94fd922affbd8f220bc9ab6832 /lld/test/ELF/linkerscript/input-order.s | |
parent | 5a39e2b0a5bfd59c821e6dbd9b5c4f97192009ea (diff) | |
download | bcm5719-llvm-66ba9f08b95cdfb36b41ab5fd6d830b5f67a3668.tar.gz bcm5719-llvm-66ba9f08b95cdfb36b41ab5fd6d830b5f67a3668.zip |
Remove useless file prefix.
Differential Revision: https://reviews.llvm.org/D24207
llvm-svn: 280540
Diffstat (limited to 'lld/test/ELF/linkerscript/input-order.s')
-rw-r--r-- | lld/test/ELF/linkerscript/input-order.s | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/lld/test/ELF/linkerscript/input-order.s b/lld/test/ELF/linkerscript/input-order.s new file mode 100644 index 00000000000..cb9ea354cdb --- /dev/null +++ b/lld/test/ELF/linkerscript/input-order.s @@ -0,0 +1,38 @@ +# REQUIRES: x86 +# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t + +# This test case should place input sections in script order: +# .foo.1 .foo.2 .bar.1 .bar.2 +# RUN: echo "SECTIONS { . = 0x1000; .foo : {*(.foo.*) *(.bar.*) } }" > %t.script +# RUN: ld.lld -o %t1 --script %t.script %t +# RUN: llvm-objdump -section=.foo -s %t1 | FileCheck --check-prefix=SCRIPT_ORDER %s +# SCRIPT_ORDER: Contents of section .foo: +# SCRIPT_ORDER-NEXT: 1000 00000000 00000000 ffffffff eeeeeeee + +# This test case should place input sections in native order: +# .bar.1 .foo.1 .bar.2 .foo.2 +# RUN: echo "SECTIONS { . = 0x1000; .foo : {*(.foo.* .bar.*)} }" > %t.script +# RUN: ld.lld -o %t1 --script %t.script %t +# RUN: llvm-objdump -section=.foo -s %t1 | FileCheck --check-prefix=FILE_ORDER %s +# FILE_ORDER: Contents of section .foo: +# FILE_ORDER-NEXT: 1000 ffffffff 00000000 eeeeeeee 00000000 + +.global _start +_start: + nop + +.section .bar.1,"a" +bar1: + .long 0xFFFFFFFF + +.section .foo.1,"a" +foo1: + .long 0 + +.section .bar.2,"a" +bar2: + .long 0xEEEEEEEE + +.section .foo.2,"a" +foo2: + .long 0 |