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_weak_defs_extra.o %S/Inputs/MachO_weak_defs_extra.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_weak_defs_extra.o
9 # Check that objects linked separately agree on the address of weak symbols.
11 # jitlink-check: *{8}WeakDefAddrInThisFile = *{8}WeakDefAddrInExtraFile
13 .section __TEXT,__text,regular,pure_instructions
14 .build_version macos, 10, 14 sdk_version 10, 14
20 .section __DATA,__data
22 .weak_definition WeakDef
27 .globl WeakDefAddrInThisFile
29 WeakDefAddrInThisFile
:
32 # Take the address of WeakDefAddrInExtraFile to force its materialization
33 .globl extra_file_anchor
36 .quad WeakDefAddrInExtraFile
39 .subsections_via_symbols