2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/data-segment-relro.s -o %t1.o
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/shared.s -o %t2.o
4 # RUN: ld.lld -shared %t2.o -o %t2.so
6 ## With relro or without DATA_SEGMENT_RELRO_END just aligns to
9 # RUN: ld.lld --hash-style=sysv -z norelro %t1.o %t2.so --script %s -o %t
10 # RUN: llvm-readobj -S %t | FileCheck %s
12 # RUN: ld.lld --hash-style=sysv -z relro %t1.o %t2.so --script %s -o %t2
13 # RUN: llvm-readobj -S %t2 | FileCheck %s
21 . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
23 .dynamic : { *(.dynamic) }
26 . = DATA_SEGMENT_RELRO_END (1 ? 24 : 0, .);
28 .got.plt : { *(.got.plt) }
32 . = DATA_SEGMENT_END (.);
38 # CHECK-NEXT: Type: SHT_PROGBITS
40 # CHECK-NEXT: SHF_ALLOC
41 # CHECK-NEXT: SHF_WRITE
43 # CHECK-NEXT: Address: 0x10F0
44 # CHECK-NEXT: Offset: 0x10F0
48 # CHECK-NEXT: AddressAlignment:
49 # CHECK-NEXT: EntrySize:
51 # CHECK-NEXT: Section {
53 # CHECK-NEXT: Name: .got.plt
54 # CHECK-NEXT: Type: SHT_PROGBITS
56 # CHECK-NEXT: SHF_ALLOC
57 # CHECK-NEXT: SHF_WRITE
59 # CHECK-NEXT: Address: 0x2000
60 # CHECK-NEXT: Offset: 0x2000
64 # CHECK-NEXT: AddressAlignment:
65 # CHECK-NEXT: EntrySize: