2 # RUN: llvm-mc -filetype=obj -triple=s390x-unknown-linux %s -o %t.o
3 # RUN: llvm-mc -filetype=obj -triple=s390x-unknown-linux %S/Inputs/gotpc-relax-und-dso.s -o %tdso.o
4 # RUN: ld.lld -shared %tdso.o -soname=t.so -o %t.so
5 # RUN: ld.lld --hash-style=sysv -shared %t.o %t.so -o %t
6 # RUN: llvm-readelf -r %t | FileCheck --check-prefix=RELOC %s
7 # RUN: llvm-objdump --no-print-imm-hex -d %t | FileCheck --check-prefix=DISASM %s
9 # RELOC-LABEL: Relocation section '.rela.dyn' at offset {{.*}} contains 3 entries:
10 # RELOC: 00000000000023f8 000000010000000a R_390_GLOB_DAT 00000000000012d8 foo + 0
11 # RELOC: 0000000000002400 000000030000000a R_390_GLOB_DAT 0000000000000000 und + 0
12 # RELOC: 0000000000002408 000000040000000a R_390_GLOB_DAT 0000000000000000 dsofoo + 0
14 # DISASM: Disassembly of section .text:
21 # DISASM-NEXT: lgrl %r1, 0x2400
22 # DISASM-NEXT: lgrl %r1, 0x2400
23 # DISASM-NEXT: lgrl %r1, 0x2408
24 # DISASM-NEXT: lgrl %r1, 0x2408
25 # DISASM-NEXT: larl %r1, 0x12dc
26 # DISASM-NEXT: larl %r1, 0x12dc
27 # DISASM-NEXT: lgrl %r1, 0x23f8
28 # DISASM-NEXT: lgrl %r1, 0x23f8
29 # DISASM-NEXT: lgrl %r1, 0x2400
30 # DISASM-NEXT: lgrl %r1, 0x2400
31 # DISASM-NEXT: lgrl %r1, 0x2408
32 # DISASM-NEXT: lgrl %r1, 0x2408
33 # DISASM-NEXT: larl %r1, 0x12dc
34 # DISASM-NEXT: larl %r1, 0x12dc
35 # DISASM-NEXT: lgrl %r1, 0x23f8
36 # DISASM-NEXT: lgrl %r1, 0x23f8
51 .type _start, @function