[ELF] Make section member orders consistent
[llvm-project.git] / lld / test / ELF / relocation-copy-align.s
blobc53c099f48cd083110baa98455e159c3848d8798
1 // REQUIRES: x86
3 /// Alignment of the copy relocated symbol is respected.
5 // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
6 // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/relocation-copy-align.s -o %t2.o
7 // RUN: ld.lld -shared %t2.o -o %t.so
8 // RUN: ld.lld %t.o %t.so -o %t3
9 // RUN: llvm-readobj -S -r --expand-relocs %t3 | FileCheck %s
11 .global _start
12 _start:
13 movl $5, x
15 // CHECK: Name: .bss
16 // CHECK-NEXT: Type: SHT_NOBITS
17 // CHECK-NEXT: Flags [
18 // CHECK-NEXT: SHF_ALLOC
19 // CHECK-NEXT: SHF_WRITE
20 // CHECK-NEXT: ]
21 // CHECK-NEXT: Address:
22 // CHECK-NEXT: Offset:
23 // CHECK-NEXT: Size: 4
24 // CHECK-NEXT: Link:
25 // CHECK-NEXT: Info:
26 // CHECK-NEXT: AddressAlignment: 4
27 // CHECK-NEXT: EntrySize:
29 // CHECK: Relocation {
30 // CHECK-NEXT: Offset:
31 // CHECK-NEXT: Type: R_X86_64_COPY
32 // CHECK-NEXT: Symbol: x
33 // CHECK-NEXT: Addend: 0x0
34 // CHECK-NEXT: }