1 ## Check how SHT_NOBITS sections are created.
3 ## Check we can use the "Size" key alone to create the section.
5 # RUN: yaml2obj -DSIZE=3 %s -o %t.size.o
6 # RUN: llvm-readelf --sections --section-data %t.size.o | FileCheck %s
8 # CHECK: [Nr] Name Type Address Off Size ES Flg Lk Inf Al
9 # CHECK: [ 1] .nobits NOBITS 0000000000000000 000040 000003 00 0 0 0
20 Content: [[CONTENT=<none>]]
22 ## Check we can't use the "Content" key.
24 # RUN: not yaml2obj -DCONTENT="'112233'" %s 2>&1 | \
25 # RUN: FileCheck %s --check-prefix=CONTENT-ERR
27 # CONTENT-ERR: error: SHT_NOBITS section cannot have "Content"
29 ## Check we create an empty section when neither of "Size" nor "Content" are specified.
31 # RUN: yaml2obj %s -o %t.empty.o
32 # RUN: llvm-readelf --sections --section-data %t.empty.o | \
33 # RUN: FileCheck %s --check-prefix=EMPTY-SEC
35 # EMPTY-SEC: [Nr] Name Type Address Off Size
36 # EMPTY-SEC: [ 1] .nobits NOBITS 0000000000000000 000040 000000