2 // RUN
: llvm-mc
-filetype
=obj
-triple
=x86_64-unknown-linux
%s
-o
%t.o
3 // RUN
: llvm-mc
-filetype
=obj
-triple
=x86_64-unknown-linux
%p
/Inputs
/relocation-size-shared.s
-o
%tso.o
4 // RUN
: ld.lld
-shared
%tso.o
-soname
=so
-o
%t1.so
5 // RUN
: ld.lld
%t.o
%t1.so
-o
%t
6 // RUN
: llvm-readobj
-r
%t | FileCheck
--check-prefix
=RELOCSHARED
%s
7 // RUN
: llvm-readelf
-x
.data %t | FileCheck --check-prefix=DATA %s
8 // RUN
: llvm-objdump
--no-print-imm-hex
-d
--no-show-raw-insn
%t | FileCheck
--check-prefix
=DISASM
%s
10 // RELOCSHARED
: Relocations
[
11 // RELOCSHARED-NEXT
: Section
({{.*}}) .rela.dyn {
12 // RELOCSHARED-NEXT
: R_X86_64_SIZE32 fooshared
0xFFFFFFFFFFFFFFFF
13 // RELOCSHARED-NEXT
: R_X86_64_SIZE32 fooshared
0x0
14 // RELOCSHARED-NEXT
: R_X86_64_SIZE32 fooshared
0x1
15 // RELOCSHARED-NEXT
: R_X86_64_SIZE64 fooshared
0xFFFFFFFFFFFFFFFF
16 // RELOCSHARED-NEXT
: R_X86_64_SIZE64 fooshared
0x0
17 // RELOCSHARED-NEXT
: R_X86_64_SIZE64 fooshared
0x1
18 // RELOCSHARED-NEXT
: }
21 // DATA
: section
'.data':
22 // DATA-NEXT
: 00000000 00000000 00000000 00000000
23 // DATA-NEXT
: 00000000 00000000 00001900 00000000
24 // DATA-NEXT
: 00001a00
00000000 00001b00
00000000
25 // DATA-NEXT
: 00000000 00000000 00000000 00000000
26 // DATA-NEXT
: 00000000 00000000 0000
29 // DISASM-NEXT
: movl
25, %eax
30 // DISASM-NEXT
: movl
26, %eax
31 // DISASM-NEXT
: movl
27, %eax
32 // DISASM-NEXT
: movl
0, %eax
33 // DISASM-NEXT
: movl
0, %eax
34 // DISASM-NEXT
: movl
0, %eax
47 .quad fooshared@SIZE-1
49 .quad fooshared@SIZE+1
58 movl fooshared@SIZE-
1,%eax
59 movl fooshared@SIZE
,%eax
60 movl fooshared@SIZE+
1,%eax