2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
4 # RUN: echo "SECTIONS { \
5 # RUN: . = SIZEOF_HEADERS; \
6 # RUN: .bss : { *(.bss) } \
7 # RUN: .data : { *(.data) } \
8 # RUN: .text : { *(.text) } }" > %t.script
9 # RUN: ld.lld %t.o --script %t.script -o %t
10 # RUN: llvm-readobj --sections --symbols %t | FileCheck %s
13 # CHECK-NEXT: Section {
14 # CHECK-NEXT: Index: 0
15 # CHECK-NEXT: Name: (0)
16 # CHECK-NEXT: Type: SHT_NULL
19 # CHECK-NEXT: Address: 0x0
20 # CHECK-NEXT: Offset: 0x0
24 # CHECK-NEXT: AddressAlignment: 0
25 # CHECK-NEXT: EntrySize: 0
27 # CHECK-NEXT: Section {
28 # CHECK-NEXT: Index: 1
29 # CHECK-NEXT: Name: .bss
30 # CHECK-NEXT: Type: SHT_NOBITS
32 # CHECK-NEXT: SHF_ALLOC
33 # CHECK-NEXT: SHF_WRITE
35 # CHECK-NEXT: Address: 0x158
36 # CHECK-NEXT: Offset: 0x158
40 # CHECK-NEXT: AddressAlignment: 1
41 # CHECK-NEXT: EntrySize: 0
43 # CHECK-NEXT: Section {
44 # CHECK-NEXT: Index: 2
45 # CHECK-NEXT: Name: .data
46 # CHECK-NEXT: Type: SHT_PROGBITS
48 # CHECK-NEXT: SHF_ALLOC
49 # CHECK-NEXT: SHF_WRITE
51 # CHECK-NEXT: Address: 0x15E
52 # CHECK-NEXT: Offset: 0x15E
56 # CHECK-NEXT: AddressAlignment: 1
57 # CHECK-NEXT: EntrySize: 0
59 # CHECK-NEXT: Section {
60 # CHECK-NEXT: Index: 3
61 # CHECK-NEXT: Name: .text
62 # CHECK-NEXT: Type: SHT_PROGBITS
64 # CHECK-NEXT: SHF_ALLOC
65 # CHECK-NEXT: SHF_EXECINSTR
67 # CHECK-NEXT: Address: 0x160
68 # CHECK-NEXT: Offset: 0x160
72 # CHECK-NEXT: AddressAlignment: 4
73 # CHECK-NEXT: EntrySize: 0