[ELF] Make section member orders consistent
[llvm-project.git] / lld / test / ELF / dynamic-got.s
blobcaf5fda06a257abf1b0edb9b3538e578f6243c1d
1 // REQUIRES: x86
2 // RUN: llvm-mc -filetype=obj -triple=i386-pc-linux %s -o %t.o
3 // RUN: ld.lld --hash-style=sysv %t.o -o %t.so -shared
4 // RUN: llvm-readobj -S -l --section-data -r %t.so | FileCheck %s
6 // CHECK: Name: .got
7 // CHECK-NEXT: Type: SHT_PROGBITS
8 // CHECK-NEXT: Flags [
9 // CHECK-NEXT: SHF_ALLOC
10 // CHECK-NEXT: SHF_WRITE
11 // CHECK-NEXT: ]
12 // CHECK-NEXT: Address:
13 // CHECK-NEXT: Offset:
14 // CHECK-NEXT: Size:
15 // CHECK-NEXT: Link:
16 // CHECK-NEXT: Info:
17 // CHECK-NEXT: AddressAlignment:
18 // CHECK-NEXT: EntrySize:
19 // CHECK-NEXT: SectionData (
20 // CHECK-NEXT: 0000: 74210000
21 // CHECK-NEXT: )
23 // CHECK: Name: .got.plt
24 // CHECK-NEXT: Type: SHT_PROGBITS
25 // CHECK-NEXT: Flags [
26 // CHECK-NEXT: SHF_ALLOC
27 // CHECK-NEXT: SHF_WRITE
28 // CHECK-NEXT: ]
29 // CHECK-NEXT: Address:
30 // CHECK-NEXT: Offset:
31 // CHECK-NEXT: Size:
32 // CHECK-NEXT: Link:
33 // CHECK-NEXT: Info:
34 // CHECK-NEXT: AddressAlignment:
35 // CHECK-NEXT: EntrySize:
36 // CHECK-NEXT: SectionData (
37 // CHECK-NEXT: 0000: 74210000 00000000 00000000
38 // CHECK-NEXT: )
40 // CHECK: Type: PT_DYNAMIC
41 // CHECK-NEXT: Offset: 0x174
42 // CHECK-NEXT: VirtualAddress: 0x2174
43 // CHECK-NEXT: PhysicalAddress: 0x2174
45 // CHECK: Relocations [
46 // CHECK-NEXT: Section ({{.*}}) .rel.dyn {
47 // CHECK-NEXT: 0x21C4 R_386_RELATIVE -
48 // CHECK-NEXT: }
49 // CHECK-NEXT: ]
51 calll .L0$pb
52 .L0$pb:
53 popl %eax
54 .Ltmp0:
55 addl $_GLOBAL_OFFSET_TABLE_+(.Ltmp0-.L0$pb), %eax
56 movl _DYNAMIC@GOT(%eax), %eax