2 #Simple assembly has 2 sections since it doesn't have any resources
3 assembly simple-assembly.exe
5 #truncate the section themselves
6 invalid offset section-table + 0 truncate
7 invalid offset section-table + 39 truncate
8 invalid offset section-table + 41 truncate
9 invalid offset section-table + 78 truncate
12 #A section RVA maps [VirtAddress,VirtAddress + RawSize] starting at PointerToRawData
13 #truncate before PointerToRawData
14 invalid offset read.uint ( section-table + 20 ) - 1 truncate
15 invalid offset read.uint ( section-table + 60 ) - 1 truncate
17 #make it point to after EOF
18 invalid offset section-table + 20 set-uint 90000
19 invalid offset section-table + 60 set-uint 90000
21 #make VirtualSize be huge
22 valid offset section-table + 8 set-uint read.uint ( section-table + 8 )
23 #invalid offset section-table + 8 + 0 set-uint 90000
25 #VirtualSize = file size + PointerToRawData + 32
26 invalid offset section-table + 16 set-uint file-size - read.uint ( section-table + 20 ) + 32
27 invalid offset section-table + 56 set-uint file-size - read.uint ( section-table + 60 ) + 32
29 invalid offset section-table + 60 set-uint 90000
31 #FIXME add section relocation tests
34 pe-section-header-flags {
35 #Simple assembly has 2 sections since it doesn't have any resources
36 assembly simple-assembly.exe
38 #first section is always text
39 valid offset section-table + 36 set-uint 0x60000020
41 valid offset section-table + 76 set-uint 0x42000040
43 invalid offset section-table + 36 set-uint 0
45 invalid offset section-table + 36 set-uint 0xFFFFFFFF