Revert "CodeGen][NewPM] Port MachineScheduler to NPM. (#125703)" (#126268)
[llvm-project.git] / llvm / test / ExecutionEngine / JITLink / x86-64 / MachO_weak_definitions.s
blob4a69ec06e57ae50ba81cab2842747c305e9a424d
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_extra_def_weak.o %S/Inputs/MachO_extra_def_weak.s
4 # RUN: llvm-mc -triple x86_64-apple-macosx10.9 -filetype=obj \
5 # RUN: -o %t/MachO_weak_definitions.o %s
6 # RUN: llvm-jitlink -noexec -check=%s %t/MachO_weak_definitions.o \
7 # RUN: %t/MachO_extra_def_weak.o
9 # Check that objects linked separately agree on the address of weak symbols.
11 # jitlink-check: *{8}ExtraDefAddrInThisFile = *{8}ExtraDefAddrInExtraFile
13 .section __TEXT,__text,regular,pure_instructions
14 .build_version macos, 10, 14 sdk_version 10, 14
15 .globl _main
16 .p2align 4, 0x90
17 _main:
18 retq
20 .section __DATA,__data
21 .globl ExtraDef
22 .weak_definition ExtraDef
23 .p2align 2
24 ExtraDef:
25 .long 1
27 .globl ExtraDefAddrInThisFile
28 .p2align 3
29 ExtraDefAddrInThisFile:
30 .quad ExtraDef
32 # Take the address of ExtraDefAddrInExtraFile to force its materialization
33 .globl extra_file_anchor
34 .p2align 3
35 extra_file_anchor:
36 .quad ExtraDefAddrInExtraFile
39 .subsections_via_symbols