1 ## Check we are able to set custom sh_offset field
2 ## for different sections.
4 # RUN: yaml2obj --docnum=1 %s -o %t1
5 # RUN: llvm-readelf --sections %t1 | FileCheck %s --check-prefix=CASE1
7 # CASE1: Section Headers:
8 # CASE1-NEXT: [Nr] Name Type Address Off
9 # CASE1-NEXT: [ 0] NULL {{.*}} 000000
10 # CASE1-NEXT: [ 1] .dynsym DYNSYM {{.*}} 000001
11 # CASE1-NEXT: [ 2] .symtab SYMTAB {{.*}} 000002
12 # CASE1-NEXT: [ 3] .dynamic DYNAMIC {{.*}} 000003
13 # CASE1-NEXT: [ 4] .rela RELA {{.*}} 000004
14 # CASE1-NEXT: [ 5] .nobits NOBITS {{.*}} 000005
15 # CASE1-NEXT: [ 6] .group GROUP {{.*}} 000006
16 # CASE1-NEXT: [ 7] .gnu.version VERSYM {{.*}} 000007
17 # CASE1-NEXT: [ 8] .gnu.version_r VERNEED {{.*}} 000008
18 # CASE1-NEXT: [ 9] .gnu.version_d VERDEF {{.*}} 000009
19 # CASE1-NEXT: [10] .regular PROGBITS {{.*}} 00000a
20 # CASE1-NEXT: [11] .strtab STRTAB {{.*}} 00000b
53 - Name: .gnu.version_r
55 Info: 0x0000000000000001
58 - Name: .gnu.version_d
60 Info: 0x0000000000000001
70 ## Here we check that defining ShOffset does not actually change
71 ## the offset at which section data is placed and also does
72 ## not affect file size.
74 # RUN: yaml2obj --docnum=2 %s -o %t2
75 # RUN: yaml2obj --docnum=3 %s -o %t3
76 # RUN: od -t x1 -v %t2 > %t.txt
77 # RUN: od -t x1 -v %t3 >> %t.txt
78 # RUN: FileCheck %s --input-file=%t.txt --ignore-case --check-prefix=CASE2
80 # CASE2: [[OFFSET:.*]] fe fe fe fe fe fe fe fe
81 # CASE2: [[FILESIZE:.*]]{{$}}
82 # CASE2: [[OFFSET]] fe fe fe fe fe fe fe fe
83 # CASE2: [[FILESIZE]]{{$}}
94 Content: "fefefefefefefefe"
106 Content: "fefefefefefefefe"