1# REQUIRES: x86 2# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %tfile1.o 3 4# RUN: echo "SECTIONS { .abc : { *(SORT(.foo.*) .bar.*) } }" > %t1.script 5# RUN: ld.lld -o %t1 --script %t1.script %tfile1.o 6# RUN: llvm-objdump -s %t1 | FileCheck %s 7 8# CHECK: Contents of section .abc: 9# CHECK: 01000000 00000000 02000000 00000000 10# CHECK: 03000000 00000000 04000000 00000000 11# CHECK: 06000000 00000000 05000000 00000000 12 13# RUN: echo "SECTIONS { \ 14# RUN: .abc : { *(SORT(.foo.* EXCLUDE_FILE (*file1.o) .bar.*) .bar.*) } \ 15# RUN: }" > %t2.script 16# RUN: ld.lld -o %t2 --script %t2.script %tfile1.o 17# RUN: llvm-objdump -s %t2 | FileCheck %s 18 19.text 20.globl _start 21_start: 22 23.section .foo.2,"a" 24 .quad 2 25 26.section .foo.3,"a" 27 .quad 3 28 29.section .foo.1,"a" 30 .quad 1 31 32.section .bar.4,"a" 33 .quad 4 34 35.section .bar.6,"a" 36 .quad 6 37 38.section .bar.5,"a" 39 .quad 5 40