2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3 # RUN: echo 'SECTIONS { .rodata : {*(.rodata.*)} .text : {*(.text.*)} }' > %t.script
5 # RUN: echo "_bar" > %t.ord
6 # RUN: echo "_foo" >> %t.ord
7 # RUN: ld.lld --symbol-ordering-file %t.ord -o %t --script %t.script %t.o
8 # RUN: llvm-objdump -s %t | FileCheck %s
10 # CHECK: Contents of section .rodata:
11 # CHECK-NEXT: 02000000 00000000 01000000 00000000
12 # CHECK: Contents of section .text:
13 # CHECK-NEXT: 02000000 00000000 01000000 00000000
15 # RUN: echo "_foo" > %t.ord
16 # RUN: echo "_bar" >> %t.ord
17 # RUN: ld.lld --symbol-ordering-file %t.ord -o %t --script %t.script %t.o
18 # RUN: llvm-objdump -s %t | FileCheck %s --check-prefix=INV
20 # INV: Contents of section .rodata:
21 # INV-NEXT: 01000000 00000000 02000000 00000000
22 # INV: Contents of section .text:
23 # INV-NEXT: 01000000 00000000 02000000 00000000
25 .section .text.foo,"a",@progbits
29 .section .text.bar,"a",@progbits
33 .section .rodata.foo,"ao",@progbits,.text.foo
36 .section .rodata.bar,"ao",@progbits,.text.bar