1 # RUN: rm -rf %t && mkdir -p %t
2 # RUN: llvm-mc -triple x86_64-pc-linux-gnu -filetype=obj \
3 # RUN: -o %t/ELF_weak_defs_extra.o %S/Inputs/ELF_weak_defs_extra.s
4 # RUN: llvm-mc -triple x86_64-pc-linux-gnu -filetype=obj \
5 # RUN: -o %t/ELF_weak_definitions.o %s
6 # RUN: llvm-jitlink -noexec -check=%s %t/ELF_weak_definitions.o \
7 # RUN: %t/ELF_weak_defs_extra.o
9 # Check that objects linked separately agree on the address of weak symbols.
11 # jitlink-check: *{8}WeakDefAddrInThisFile = *{8}WeakDefAddrInExtraFile
14 .file "ELF_weak_definitions.c"
19 movq WeakDef@GOTPCREL
(%rip
), %rax
23 .size main, .Lfunc_end0-main
33 .type WeakDefAddrInThisFile,@object
34 .globl WeakDefAddrInThisFile
36 WeakDefAddrInThisFile
:
38 .size WeakDefAddrInThisFile, 8
41 .type extra_file_anchor,@object
42 .globl extra_file_anchor
45 .quad WeakDefAddrInExtraFile
46 .size extra_file_anchor, 8
48 .ident "clang version 10.0.0-4ubuntu1 "
49 .section ".note.GNU-stack","",@progbits
52 .addrsig_sym WeakDefAddrInExtraFile