1 ## In this test case we check that we can override the default values for
2 ## e_shentsize, e_shoff, e_shnum and e_shstrndx fields in the YAML.
4 ## First we check the default values.
6 # RUN: yaml2obj --docnum=1 %s -o %t1
7 # RUN: llvm-readelf --file-headers %t1 | FileCheck %s --check-prefix=DEFAULT
9 # DEFAULT: Start of section headers: 120 (bytes into file)
10 # DEFAULT: Size of section headers: 64 (bytes)
11 # DEFAULT: Number of section headers: 4
12 # DEFAULT: Section header string table index: 3
21 ## Override 3 fields: e_shoff, e_shnum and e_shstrndx. Check the output.
23 # RUN: yaml2obj --docnum=2 %s -o %t2
24 # RUN: llvm-readelf --file-headers %t2 | FileCheck %s --check-prefix=CUSTOM
26 # CUSTOM: Start of section headers: 2 (bytes into file)
27 # CUSTOM: Size of section headers: 64 (bytes)
28 # CUSTOM: Number of section headers: 3
29 # CUSTOM: Section header string table index: 4
42 ## Finally, we use the same YAML as above, but set e_shentsize to 1.
43 ## Check the result using raw output from 'od' because llvm-readelf
44 ## is unable to dump such headers.
46 # RUN: yaml2obj --docnum=3 %s -o %t3
47 # RUN: od -A n -t x1 -v -j 0x3a -N 1 %t3 | FileCheck %s --check-prefix=NEWSIZE
48 # RUN: od -A n -t x1 -v -j 0x3a -N 1 %t2 | FileCheck %s --check-prefix=OLDSIZE