2 # RUN: rm -rf %t; split-file %s %t
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o
5 # RUN: %lld -o %t/test-1 %t/test.o -order_file %t/order-file-1
6 # RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t/test-1 | FileCheck %s
7 # RUN: %lld -o %t/test-2 %t/test.o -order_file %t/order-file-2
8 # RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t/test-2 | FileCheck %s
9 # CHECK-LABEL: Disassembly of section __TEXT,__text:
10 # CHECK: <_ba{{r|z}}>:
11 # CHECK-NEXT: callq {{.*}} <_foo>
18 # CHECK-NEXT: callq {{.*}} <_ba{{r|z}}>
19 # CHECK-NEXT: movq $0, %rax
26 ## _qux is marked as .alt_entry, so it should not create a new subsection and
27 ## its contents should move with _bar to the start of the output despite the
28 ## order file listing it at the end.
32 ## _bar and _baz point to the same address, so both order files should achieve
41 .globl _main, _foo, _bar, _qux
58 .subsections_via_symbols