3 # RUN: echo ".section .foo,\"a\"" > %t.s
4 # RUN: echo ".quad 1" >> %t.s
5 # RUN: echo ".section .bar,\"a\"" >> %t.s
6 # RUN: echo ".quad 1" >> %t.s
7 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %t.s -o %t.o
9 # RUN: ld.lld -o %t %t.o --script %s
10 # RUN: llvm-readelf -S -l %t | FileCheck %s
12 ## Check that we can produce output without errors,
13 ## and .foo section has proper size.
14 # CHECK: Section Headers:
15 # CHECK-NEXT: [Nr] Name Type Address Off Size
16 # CHECK-NEXT: [ 0] NULL 0000000000000000 000000 000000
17 # CHECK-NEXT: [ 1] .foo PROGBITS 0000000000001000 001000 000108
18 # CHECK-NEXT: [ 2] .bar PROGBITS 0000000000001108 001108 000008
20 ## Check that load address is correct.
21 # CHECK: Program Headers:
22 # CHECK-NEXT: Type Offset VirtAddr PhysAddr FileSiz MemSiz
23 # CHECK-NEXT: LOAD 0x001000 0x0000000000001000 0x0000000000002000 0x000110 0x000110
26 ram (rwx) : org = 0x1000, len = 0x200
27 flash (rwx) : org = 0x2000, len = 0x200