59 lines · plain
1# REQUIRES: x862# RUN: rm -rf %t; split-file %s %t3# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o4 5# RUN: %lld -o %t/test-1 %t/test.o -order_file %t/order-file-16# RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t/test-1 | FileCheck %s7# RUN: %lld -o %t/test-2 %t/test.o -order_file %t/order-file-28# RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t/test-2 | FileCheck %s9# CHECK-LABEL: Disassembly of section __TEXT,__text:10# CHECK: <_ba{{r|z}}>:11# CHECK-NEXT: callq {{.*}} <_foo>12# CHECK-EMPTY:13# CHECK-NEXT: <_qux>:14# CHECK-NEXT: retq15# CHECK: <_foo>:16# CHECK-NEXT: retq17# CHECK: <_main>:18# CHECK-NEXT: callq {{.*}} <_ba{{r|z}}>19# CHECK-NEXT: movq $0, %rax20# CHECK-NEXT: retq21 22#--- order-file-123_bar24_foo25_main26## _qux is marked as .alt_entry, so it should not create a new subsection and27## its contents should move with _bar to the start of the output despite the28## order file listing it at the end.29_qux30 31#--- order-file-232## _bar and _baz point to the same address, so both order files should achieve33## the same result.34_baz35_foo36_main37_qux38 39#--- test.s40.text41.globl _main, _foo, _bar, _qux42.alt_entry _qux43 44_foo:45 retq46 47_main:48 callq _bar49 movq $0, %rax50 retq51 52_bar:53_baz:54 callq _foo55_qux:56 retq57 58.subsections_via_symbols59