[ELF] Refine isExported/isPreemptible condition
[llvm-project.git] / lld / test / ELF / systemz-gotent-relax-und-dso.s
blobe8b88056299cbf798753ba304a994623cb5db254
1 # REQUIRES: systemz
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:
15 # DISASM-EMPTY:
16 # DISASM-NEXT: <foo>:
17 # DISASM-NEXT: nop
18 # DISASM: <hid>:
19 # DISASM-NEXT: nop
20 # DISASM: <_start>:
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
38 .text
39 .globl foo
40 .type foo, @function
41 foo:
42 nop
44 .globl hid
45 .hidden hid
46 .type hid, @function
47 hid:
48 nop
50 .globl _start
51 .type _start, @function
52 _start:
53 lgrl %r1, und@GOT
54 lgrl %r1, und@GOT
55 lgrl %r1, dsofoo@GOT
56 lgrl %r1, dsofoo@GOT
57 lgrl %r1, hid@GOT
58 lgrl %r1, hid@GOT
59 lgrl %r1, foo@GOT
60 lgrl %r1, foo@GOT
61 lgrl %r1, und@GOT
62 lgrl %r1, und@GOT
63 lgrl %r1, dsofoo@GOT
64 lgrl %r1, dsofoo@GOT
65 lgrl %r1, hid@GOT
66 lgrl %r1, hid@GOT
67 lgrl %r1, foo@GOT
68 lgrl %r1, foo@GOT