2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3 # RUN: echo "SECTIONS { .foo : { *(.foo) } }" > %t.script
5 # RUN: ld.lld %t.o --script %t.script -o %t.out
6 # RUN: llvm-objdump -s %t.out| FileCheck %s --check-prefix=BEFORE
7 # BEFORE: Contents of section .foo:
10 # RUN: echo "_foo2" > %t.ord
11 # RUN: echo "_foo1" >> %t.ord
12 # RUN: ld.lld --symbol-ordering-file %t.ord %t.o --script %t.script -o %t2.out
13 # RUN: llvm-objdump -s %t2.out| FileCheck %s --check-prefix=AFTER
14 # AFTER: Contents of section .foo:
17 # RUN: echo "SECTIONS { .text : { *(.text) } }" > %t2.script
18 # RUN: ld.lld --symbol-ordering-file %t.ord %t.o --script %t2.script -o %t3.out
19 # RUN: llvm-objdump -s %t3.out| FileCheck %s --check-prefix=AFTER
21 # RUN: echo "SECTIONS { .foo : { BYTE(0x33); *(.foo); BYTE(0x44) } }" > %t3.script
22 # RUN: ld.lld --symbol-ordering-file %t.ord %t.o --script %t3.script -o %t4.out
23 # RUN: llvm-objdump -s %t4.out| FileCheck %s --check-prefix=COMMANDS
24 # COMMANDS: Contents of section .foo:
25 # COMMANDS-NEXT: 33221144
27 .section .foo,"ax",@progbits,unique,1
31 .section .foo,"ax",@progbits,unique,2