1 ## .empty is not covered by a segment. Its offset is moved to 0x200 to fill the gap.
2 # RUN: yaml2obj --docnum=1 %s -o %t1
3 # RUN: llvm-objcopy %t1 %t1.out
4 # RUN: llvm-readelf -S %t1.out | FileCheck --check-prefix=CHECK1 %s
6 # CHECK1: Name Type Address Off
7 # CHECK1-NEXT: NULL 0000000000000000 000000
8 # CHECK1-NEXT: .foo PROGBITS 0000000000000000 000100
9 # CHECK1-NEXT: .empty PROGBITS 0000000000001000 000200
10 # CHECK1-NEXT: .baz PROGBITS 0000000000001000 001000
39 ## Test that we attribute .empty to the second segment. Its offset is assigned according to
40 ## the p_offset of the second segment.
41 # RUN: yaml2obj --docnum=2 %s -o %t2
42 # RUN: llvm-objcopy %t2 %t2.out
43 # RUN: llvm-readelf -S -l %t2.out | FileCheck --check-prefix=CHECK2 %s
45 # CHECK2: Name Type Address Off
46 # CHECK2-NEXT: NULL 0000000000000000 000000
47 # CHECK2-NEXT: .foo PROGBITS 0000000000000000 000100
48 # CHECK2-NEXT: .empty PROGBITS 0000000000001000 001000
49 # CHECK2-NEXT: .baz PROGBITS 0000000000001000 001000
51 # CHECK2: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
52 # CHECK2-NEXT: LOAD 0x000100 0x0000000000000000 0x0000000000000000 0x000100 0x000100 0x100
53 # CHECK2-NEXT: LOAD 0x001000 0x0000000000001000 0x0000000000001000 0x000100 0x000100 0x1000