Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / ExecutionEngine / JITLink / x86-64 / MachO_absolute_symbols.s
blobedeb790ffe97722d5841b7eca0eb7ede0fc6ae4b
1 # RUN: rm -rf %t && mkdir -p %t
2 # RUN: llvm-mc -triple x86_64-apple-macosx10.9 -filetype=obj \
3 # RUN: -o %t/MachO_global_absolute_def.o %S/Inputs/MachO_global_absolute_def.s
4 # RUN: llvm-mc -triple x86_64-apple-macosx10.9 -filetype=obj \
5 # RUN: -o %t/MachO_local_absolute_def.o %S/Inputs/MachO_local_absolute_def.s
6 # RUN: llvm-mc -triple x86_64-apple-macosx10.9 -filetype=obj \
7 # RUN: -o %t/MachO_absolute_symbols.o %s
8 # RUN: llvm-jitlink -noexec -check=%s %t/MachO_absolute_symbols.o \
9 # RUN: %t/MachO_global_absolute_def.o %t/MachO_local_absolute_def.o
11 # Check that both global and local absolute defs work as expected (global
12 # absolutes visible, local ones not).
14 # jitlink-check: *{4}_GlobalAbsoluteSymDefValue = 0x01234567
15 # jitlink-check: *{4}_LocalAbsoluteSymDefValue = 0x89ABCDEF
17 .section __TEXT,__text,regular,pure_instructions
18 .build_version macos, 10, 14 sdk_version 10, 14
19 .globl _main
20 .p2align 4, 0x90
21 _main:
22 retq
24 .section __DATA,__data
25 # Take the address of GlobalAbsoluteSymDefValue and LocalAbsoluteSymDefValue
26 # to force linking of the extra input files.
27 .globl extra_files_anchor
28 .p2align 3
29 extra_files_anchor:
30 .quad _GlobalAbsoluteSymDefValue
31 .quad _LocalAbsoluteSymDefValue
33 .subsections_via_symbols