1 # RUN: rm -rf %t && mkdir -p %t
2 # RUN: llvm-mc -triple=x86_64-unknown-linux -relax-relocations=false -position-independent -filetype=obj -o %t/elf_common.o %s
3 # RUN: llvm-jitlink -entry=load_common -noexec -check %s %t/elf_common.o
9 .type load_common,@function
12 # Check that common variable GOT entry is synthesized correctly. In order to
13 # prevent the optimizer from relaxing the edge, we use a movl instruction.
14 # jitlink-check: decode_operand(load_common, 4) = \
15 # jitlink-check: got_addr(elf_common.o, common_data) - next_pc(load_common)
16 # jitlink-check: *{8}(got_addr(elf_common.o, common_data)) = common_data
17 movl common_data@GOTPCREL
(%rip
), %eax
20 .size load_common, .-load_common
22 # Check that common is zero-filled.
23 # jitlink-check: *{4}(common_data) = 0
24 .type common_data,@object