diff --git a/amd64/Development/M0.M1 b/amd64/Development/M0.M1 index 0cdaf8c..98d6173 100644 --- a/amd64/Development/M0.M1 +++ b/amd64/Development/M0.M1 @@ -1169,4 +1169,4 @@ DEFINE xor_r13,r13 4D31ED :root_device %0 %0 -:PE32_end +:ELF_end diff --git a/amd64/Development/catm.M1 b/amd64/Development/catm.M1 index fc98710..6977e2f 100644 --- a/amd64/Development/catm.M1 +++ b/amd64/Development/catm.M1 @@ -303,4 +303,4 @@ DEFINE xor_r9,r9 4D31C9 :root_device %0 %0 -:PE32_end +:ELF_end diff --git a/amd64/Development/hex0.M1 b/amd64/Development/hex0.M1 index 600d088..47fac8c 100644 --- a/amd64/Development/hex0.M1 +++ b/amd64/Development/hex0.M1 @@ -360,4 +360,4 @@ DEFINE xor_r9,r9 4D31C9 @0x11d2 !0x8e !0x39 !0 !0xa0 !0xc9 !0x69 !0x72 !0x3b -:PE32_end +:ELF_end diff --git a/amd64/Development/hex0.hex2 b/amd64/Development/hex0.hex2 index d1006bb..0ef85fd 100644 --- a/amd64/Development/hex0.hex2 +++ b/amd64/Development/hex0.hex2 @@ -289,4 +289,4 @@ D2 11 ; @0x11d2 8E 39 00 A0 C9 69 72 3B ; !0x8e !0x39 !0 !0xa0 !0xc9 !0x69 !0x72 !0x3b -:PE32_end +:ELF_end diff --git a/amd64/Development/hex1.M1 b/amd64/Development/hex1.M1 index cc41fe6..121808f 100644 --- a/amd64/Development/hex1.M1 +++ b/amd64/Development/hex1.M1 @@ -488,4 +488,4 @@ DEFINE xor_r9,r9 4D31C9 @0x11d2 !0x8e !0x39 !0 !0xa0 !0xc9 !0x69 !0x72 !0x3b -:PE32_end +:ELF_end diff --git a/amd64/Development/hex1.hex2 b/amd64/Development/hex1.hex2 index 5f1e246..8a913c4 100644 --- a/amd64/Development/hex1.hex2 +++ b/amd64/Development/hex1.hex2 @@ -406,4 +406,4 @@ D2 11 ; @0x11d2 8E 39 00 A0 C9 69 72 3B ; !0x8e !0x39 !0 !0xa0 !0xc9 !0x69 !0x72 !0x3b -:PE32_end +:ELF_end diff --git a/amd64/Development/hex2.M1 b/amd64/Development/hex2.M1 index 2a1b0d8..df9bca4 100644 --- a/amd64/Development/hex2.M1 +++ b/amd64/Development/hex2.M1 @@ -808,4 +808,4 @@ DEFINE xor_r9,r9 4D31C9 :root_device %0 %0 -:PE32_end +:ELF_end diff --git a/amd64/Development/kaem-optional.M1 b/amd64/Development/kaem-optional.M1 index 20cd606..c8534d0 100644 --- a/amd64/Development/kaem-optional.M1 +++ b/amd64/Development/kaem-optional.M1 @@ -564,4 +564,4 @@ DEFINE xor_r15,r15 4D31FF :system_out %0 %0 -:PE32_end +:ELF_end diff --git a/amd64/Development/kaem-optional.hex2 b/amd64/Development/kaem-optional.hex2 index 6ead30b..dacb700 100644 --- a/amd64/Development/kaem-optional.hex2 +++ b/amd64/Development/kaem-optional.hex2 @@ -459,4 +459,4 @@ :system_out 00 00 00 00 00 00 00 00 -:PE32_end +:ELF_end diff --git a/amd64/catm.hex2 b/amd64/catm.hex2 index 148ef70..852bd8a 100644 --- a/amd64/catm.hex2 +++ b/amd64/catm.hex2 @@ -3,6 +3,7 @@ # # SPDX-License-Identifier: GPL-3.0-or-later +:PE32_base # DOS MZ header 4D 5A # Signature 00 00 # Number of bytes in the last page. @@ -26,14 +27,14 @@ 40 00 00 00 # Starting address of the PE header # [0x40] -# PE header +:PE_header 50 45 00 00 # Signature "PE" 64 86 # Machine 01 00 # number of sections 00 00 00 00 # Timestamp supposedly 00 00 00 00 # PointerToSymbolTable 00 00 00 00 # number of symbols -F0 00 # SizeOfOptionalHeader +@OptionalHeader_end>PE_header # SizeOfOptionalHeader 00 00 # 'Characteristics' # [0x58] @@ -44,16 +45,16 @@ F0 00 # SizeOfOptionalHeader 00 00 00 00 # sizeOfInitializedData 00 00 00 00 # SizeOfUninitializedData 00 10 00 00 # AddressOfEntryPoint -00 10 00 00 # BaseOfCode -00 00 00 80 01 00 00 00 # ImageBase +00 00 00 00 # BaseOfCode +00 00 00 00 00 00 00 00 # ImageBase 01 00 00 00 # SectionAlignment 01 00 00 00 # FileAlignment 00 00 00 00 # OperatingSystemVersion 00 00 00 00 # ImageVersion 00 00 00 00 # SubsystemVersion 00 00 00 00 # Win32VersionValue -00 20 00 00 # SizeOfImage -70 01 00 00 # SizeOfHeaders +00 00 10 00 # SizeOfImage +%PE32_text>PE32_base # SizeOfHeaders 00 00 00 00 # CheckSum (isn't used at all) 0A 00 # Subsystem 00 00 # DllCharacteristics @@ -111,6 +112,9 @@ F0 00 # SizeOfOptionalHeader 00 00 00 00 # CLR Runtime header table 00 00 00 00 # Size of CLR Runtime Header table +# [0x130] +:OptionalHeader_end + 00 00 00 00 00 00 00 00 # MUST BE NULL # no idea what it is yet @@ -119,10 +123,10 @@ F0 00 # SizeOfOptionalHeader # [0x148] # Start of section headers -00 00 00 00 00 00 00 00 ; Name of the section (empty) but could set to ".text" -%PE32_end>PE32_text ; VirtualSize +2E 74 65 78 74 00 00 00 ; Name of the section: ".text" +%ELF_end>PE32_text ; VirtualSize 00 10 00 00 ; VirtualAddress -%PE32_end>PE32_text ; SizeOfRawData +%ELF_end>PE32_text ; SizeOfRawData 70 01 00 00 ; PointerToRawData 00 00 00 00 ; PointerToRelocations 00 00 00 00 ; PointerToLinenumbers @@ -131,7 +135,6 @@ F0 00 # SizeOfOptionalHeader 00 00 00 00 ; 'Characteristics' # [0x170] - :PE32_text # efi_main(void *image_handle, struct efi_system_table *system) @@ -371,4 +374,4 @@ F0 00 # SizeOfOptionalHeader :root_device 00000000 00000000 -:PE32_end +:ELF_end diff --git a/amd64/hex0.hex0 b/amd64/hex0.hex0 index 5a8fb48..3ed25f4 100644 --- a/amd64/hex0.hex0 +++ b/amd64/hex0.hex0 @@ -52,8 +52,8 @@ F0 00 # SizeOfOptionalHeader 00 00 00 00 # sizeOfInitializedData 00 00 00 00 # SizeOfUninitializedData 00 10 00 00 # AddressOfEntryPoint -00 10 00 00 # BaseOfCode -00 00 00 80 01 00 00 00 # ImageBase +00 00 00 00 # BaseOfCode +00 00 00 00 00 00 00 00 # ImageBase 01 00 00 00 # SectionAlignment 01 00 00 00 # FileAlignment 00 00 00 00 # OperatingSystemVersion @@ -418,4 +418,4 @@ D1 01 00 00 ; SizeOfRawData D2 11 ; @0x11d2 8E 39 00 A0 C9 69 72 3B ; !0x8e !0x39 !0 !0xa0 !0xc9 !0x69 !0x72 !0x3b -# :PE32_end [_start+0x1D1] +# :ELF_end [_start+0x1D1] diff --git a/amd64/hex1.hex0 b/amd64/hex1.hex0 index 2edb784..456baf7 100644 --- a/amd64/hex1.hex0 +++ b/amd64/hex1.hex0 @@ -47,8 +47,8 @@ F0 00 # SizeOfOptionalHeader 00 00 00 00 # sizeOfInitializedData 00 00 00 00 # SizeOfUninitializedData 00 10 00 00 # AddressOfEntryPoint -00 10 00 00 # BaseOfCode -00 00 00 80 01 00 00 00 # ImageBase +00 00 00 00 # BaseOfCode +00 00 00 00 00 00 00 00 # ImageBase 01 00 00 00 # SectionAlignment 01 00 00 00 # FileAlignment 00 00 00 00 # OperatingSystemVersion @@ -536,4 +536,4 @@ CF 03 00 00 ; SizeOfRawData D2 11 ; @0x11d2 8E 39 00 A0 C9 69 72 3B ; !0x8e !0x39 !0 !0xa0 !0xc9 !0x69 !0x72 !0x3b -# :PE32_end [_start+0x3CF] +# :ELF_end [_start+0x3CF] diff --git a/amd64/hex2.hex1 b/amd64/hex2.hex1 index 9c26c1c..f1a748f 100644 --- a/amd64/hex2.hex1 +++ b/amd64/hex2.hex1 @@ -56,8 +56,8 @@ F0 00 # SizeOfOptionalHeader 00 00 00 00 # sizeOfInitializedData 00 00 00 00 # SizeOfUninitializedData 00 10 00 00 # AddressOfEntryPoint -00 10 00 00 # BaseOfCode -00 00 00 80 01 00 00 00 # ImageBase +00 00 00 00 # BaseOfCode +00 00 00 00 00 00 00 00 # ImageBase 01 00 00 00 # SectionAlignment 01 00 00 00 # FileAlignment 00 00 00 00 # OperatingSystemVersion @@ -825,4 +825,4 @@ DD 06 00 00 ; SizeOfRawData :6 #:root_device 00000000 00000000 -# :PE32_end +# :ELF_end diff --git a/amd64/kaem-optional.hex0 b/amd64/kaem-optional.hex0 index e7a3849..21acad5 100644 --- a/amd64/kaem-optional.hex0 +++ b/amd64/kaem-optional.hex0 @@ -44,8 +44,8 @@ F0 00 # SizeOfOptionalHeader 00 00 00 00 # sizeOfInitializedData 2B 00 00 00 # SizeOfUninitializedData 00 10 00 00 # AddressOfEntryPoint -00 10 00 00 # BaseOfCode -00 00 00 80 01 00 00 00 # ImageBase +00 00 00 00 # BaseOfCode +00 00 00 00 00 00 00 00 # ImageBase 01 00 00 00 # SectionAlignment 01 00 00 00 # FileAlignment 00 00 00 00 # OperatingSystemVersion @@ -576,7 +576,7 @@ EE 03 00 00 ; SizeOfRawData # :suffix [_start+0x3EB] 0A 00 0D ; L"Subprocess error\n\r" -# :PE32_end [_start+0x3EE] +# :ELF_end [_start+0x3EE] # :image_handle [_start+0x3F1] # :image [_start+0x3F9] # :rootdir [_start+0x401]