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
51 - Name: .gnu.version_r
55 - Name: .gnu.version_d
66 ## Here we check that defining ShOffset does not actually change
67 ## the offset at which section data is placed and also does
68 ## not affect file size.
70 # RUN: yaml2obj --docnum=2 %s -o %t2
71 # RUN: yaml2obj --docnum=3 %s -o %t3
72 # RUN: od -t x1 -v %t2 > %t.txt
73 # RUN: od -t x1 -v %t3 >> %t.txt
74 # RUN: FileCheck %s --input-file=%t.txt --ignore-case --check-prefix=CASE2
76 # CASE2: [[OFFSET:.*]] fe fe fe fe fe fe fe fe
77 # CASE2: [[FILESIZE:.*]]{{$}}
78 # CASE2: [[OFFSET]] fe fe fe fe fe fe fe fe
79 # CASE2: [[FILESIZE]]{{$}}
89 Content: "fefefefefefefefe"
100 Content: "fefefefefefefefe"