1 // RUN
: llvm-mc
-filetype
=obj
-triple x86_64-pc-linux-gnu
%s
-o
- | llvm-readobj
-r | FileCheck
%s
3 // Test that relocations with local symbols in
a mergeable section are done
4 // with
a reference to the symbol if the offset is non zero.
7 movsd
.Lfoo(%rip), %xmm1
11 movq foo@GOTPCREL
, %rax
13 movsd
.Lfoo+4(%rip), %xmm1
15 .section .sec1,"aM",@progbits,16
20 .section bar,"ax",@progbits
23 // CHECK
: Relocations
[
24 // CHECK-NEXT
: Section
{{.*}} .rela.text {
25 // CHECK-NEXT
: 0x
{{[^
]+}} R_X86_64_PC32
.Lfoo 0x{{[^ ]+}}
26 // CHECK-NEXT
: 0x
{{[^
]+}} R_X86_64_32
.sec1 0x{{[^ ]+}}
27 // CHECK-NEXT
: 0x
{{[^
]+}} R_X86_64_32
.Lfoo 0x{{[^ ]+}}
28 // CHECK-NEXT
: 0x
{{[^
]+}} R_X86_64_PLT32 foo
0x
{{[^
]+}}
29 // CHECK-NEXT
: 0x
{{[^
]+}} R_X86_64_GOTPCREL foo
0x
{{[^
]+}}
30 // CHECK-NEXT
: 0x
{{[^
]+}} R_X86_64_32S zed
0x
{{[^
]+}}
31 // CHECK-NEXT
: 0x
{{[^
]+}} R_X86_64_PC32
.sec1 0x{{[^ ]+}}