2 ## Verify that R_390_GOTENT optimization is not performed on misaligned symbols.
4 # RUN: llvm-mc -filetype=obj -triple=s390x-unknown-linux %s -o %t.o
5 # RUN: ld.lld %t.o -o %t1
6 # RUN: llvm-readelf -S -r -x .got -x .got.plt %t1 | FileCheck --check-prefixes=CHECK %s
7 # RUN: llvm-objdump --no-print-imm-hex -d %t1 | FileCheck --check-prefix=DISASM %s
9 ## We retain one .got entry for the unaligned symbol.
10 # CHECK: Name Type Address Off Size ES Flg Lk Inf Al
11 # CHECK: .got PROGBITS 00000000010021e0 0001e0 000020 00 WA 0 0 8
12 # CHECK-NEXT: .relro_padding NOBITS 0000000001002200 000200 000e00 00 WA 0 0 1
13 # CHECK-NEXT: .data PROGBITS 0000000001003200 000200 000006 00 WA 0 0 2
15 # CHECK-LABEL: Hex dump of section '.got':
16 # CHECK-NEXT: 0x010021e0 00000000 00000000 00000000 00000000
17 # CHECK-NEXT: 0x010021f0 00000000 00000000 00000000 01003205
19 # DISASM: Disassembly of section .text:
21 # DISASM-NEXT: larl %r1, 0x1003200
22 # DISASM-NEXT: larl %r1, 0x1003200
23 # DISASM-NEXT: lgrl %r1, 0x10021f8
24 # DISASM-NEXT: lgrl %r1, 0x10021f8
43 .type _start, @function
45 lgrl
%r1, var_align@GOT
46 lgrl
%r1, var_align@GOT
47 lgrl
%r1, var_unalign@GOT
48 lgrl
%r1, var_unalign@GOT