1 # RUN: rm -rf %t && mkdir -p %t
2 # RUN: llvm-mc -triple=arm64-apple-darwin19 -filetype=obj -o %t/main.o %s
3 # RUN: llvm-mc -triple=arm64-apple-darwin19 -filetype=obj -o %t/aux_common.o \
4 # RUN: %S/Inputs/MachO_common_x_and_addr_getter.s
5 # RUN: llvm-mc -triple=arm64-apple-darwin19 -filetype=obj -o %t/aux_strong.o \
6 # RUN: %S/Inputs/MachO_strong_x_and_addr_getter.s
7 # RUN: llvm-jitlink -noexec %t/main.o %t/aux_common.o
8 # RUN: llvm-jitlink -noexec -check=%s %t/main.o %t/aux_strong.o
10 # Check that linking multiple common definitions of the same symbol (in this
11 # case _x) doesn't lead to an "Unexpected definitions" error.
15 # Check that strong defs override:
16 # jitlink-check: *{8}_x = 42
18 .section __TEXT,__text,regular,pure_instructions
22 stp x29
, x30
, [sp
, #-16]!
26 ldr x8
, [x8
, _x@GOTPAGEOFF
]
29 ldp x29
, x30
, [sp
], #16
33 .subsections_via_symbols