search for: e_hdr_pe32p

Displaying 10 results from an estimated 10 matches for "e_hdr_pe32p".

2013 Nov 27
20
[PATCH 0/4] efi: PE header generation fix
The PE headers of the generated efi file were quite buggy. And since OVMF perform a few consistency checks, syslinux was unable to run on it. I don't pretend to have a thorough understanding of the PE+ headers, some bugs may remain. :) Celelibi (4): efi: Fix PE header field rva_and_sizes_nr efi: Location, size and alignment of .text section efi: Useless relocations in PE file efi: PE
2013 Nov 27
0
[PATCH 2/4] efi: Location, size and alignment of .text section
...e_hdr.headers_sz = hdr_sz; e_hdr.subsystem = IMAGE_SUBSYSTEM_EFI_APPLICATION; e_hdr.rva_and_sizes_nr = sizeof(e_hdr.data_directory) / sizeof(__uint64_t); fwrite(&e_hdr, sizeof(e_hdr), 1, f); } else if (class == ELFCLASS64) { - hdr_sz = sizeof(o_hdr_pe32p) + sizeof(t_sec) + sizeof(e_hdr_pe32p) + - sizeof(r_sec) + sizeof(c_hdr) + sizeof(hdr) + sizeof(c_rel) - + sizeof(dummy); - total_sz += hdr_sz; - entry += hdr_sz; c_hdr.arch = IMAGE_FILE_MACHINE_X86_64; c_hdr.characteristics = IMAGE_FILE_DEBUG_STRIPPED | IMAGE_FILE_EXECUTABLE_IMAGE | IMAGE_FILE_LINE_NUMBERS_STRIPPED;...
2013 Nov 27
0
[PATCH 1/4] efi: Fix PE header field rva_and_sizes_nr
...I_APPLICATION; - e_hdr.rva_and_sizes_nr = 1; + e_hdr.rva_and_sizes_nr = sizeof(e_hdr.data_directory) / sizeof(__uint64_t); fwrite(&e_hdr, sizeof(e_hdr), 1, f); } else if (class == ELFCLASS64) { @@ -130,7 +130,7 @@ static void write_header(FILE *f, __uint32_t entry, size_t data_size, e_hdr_pe32p.image_sz = total_sz; e_hdr_pe32p.headers_sz = 512; e_hdr_pe32p.subsystem = IMAGE_SUBSYSTEM_EFI_APPLICATION; - e_hdr_pe32p.rva_and_sizes_nr = 1; + e_hdr_pe32p.rva_and_sizes_nr = sizeof(e_hdr_pe32p.data_directory) / sizeof(__uint64_t); fwrite(&e_hdr_pe32p, sizeof(e_hdr_pe32p), 1, f);...
2013 Dec 01
0
[PATCH v2 1/4] efi: Fix PE header field rva_and_sizes_nr
...I_APPLICATION; - e_hdr.rva_and_sizes_nr = 1; + e_hdr.rva_and_sizes_nr = sizeof(e_hdr.data_directory) / sizeof(__uint64_t); fwrite(&e_hdr, sizeof(e_hdr), 1, f); } else if (class == ELFCLASS64) { @@ -130,7 +130,7 @@ static void write_header(FILE *f, __uint32_t entry, size_t data_size, e_hdr_pe32p.image_sz = total_sz; e_hdr_pe32p.headers_sz = 512; e_hdr_pe32p.subsystem = IMAGE_SUBSYSTEM_EFI_APPLICATION; - e_hdr_pe32p.rva_and_sizes_nr = 1; + e_hdr_pe32p.rva_and_sizes_nr = sizeof(e_hdr_pe32p.data_directory) / sizeof(__uint64_t); fwrite(&e_hdr_pe32p, sizeof(e_hdr_pe32p), 1, f);...
2013 Dec 01
0
[PATCH v2 3/4] efi: Useless relocations in PE file
.../wrapper.c +++ b/efi/wrapper.c @@ -48,14 +48,12 @@ static void write_header(FILE *f, __uint32_t entry, size_t data_size, { struct optional_hdr o_hdr; struct optional_hdr_pe32p o_hdr_pe32p; - struct section t_sec, r_sec; + struct section t_sec; struct extra_hdr e_hdr; struct extra_hdr_pe32p e_hdr_pe32p; struct coff_hdr c_hdr; struct header hdr; - struct coff_reloc c_rel; __uint32_t total_sz = data_size; - __uint32_t dummy = 0; __uint32_t hdr_sz; __uint32_t reloc_start, reloc_end; @@ -82,7 +80,7 @@ static void write_header(FILE *f, __uint32_t entry, size_t data_size, fwrite(&hdr,...
2013 Nov 27
0
[PATCH 3/4] efi: Useless relocations in PE file
.../wrapper.c +++ b/efi/wrapper.c @@ -48,14 +48,12 @@ static void write_header(FILE *f, __uint32_t entry, size_t data_size, { struct optional_hdr o_hdr; struct optional_hdr_pe32p o_hdr_pe32p; - struct section t_sec, r_sec; + struct section t_sec; struct extra_hdr e_hdr; struct extra_hdr_pe32p e_hdr_pe32p; struct coff_hdr c_hdr; struct header hdr; - struct coff_reloc c_rel; __uint32_t total_sz = data_size; - __uint32_t dummy = 0; __uint32_t hdr_sz; __uint32_t reloc_start, reloc_end; @@ -78,7 +76,7 @@ static void write_header(FILE *f, __uint32_t entry, size_t data_size, fwrite(&hdr,...
2013 Dec 01
0
[PATCH v2 4/4] efi: PE file size differ from in-memory size
...r.image_sz = hdr_sz + so_memsz; e_hdr.headers_sz = hdr_sz; e_hdr.subsystem = IMAGE_SUBSYSTEM_EFI_APPLICATION; e_hdr.rva_and_sizes_nr = sizeof(e_hdr.data_directory) / sizeof(__uint64_t); @@ -123,7 +123,7 @@ static void write_header(FILE *f, __uint32_t entry, size_t data_size, memset(&e_hdr_pe32p, 0, sizeof(e_hdr_pe32p)); e_hdr_pe32p.section_align = 4096; e_hdr_pe32p.file_align = 512; - e_hdr_pe32p.image_sz = hdr_sz + so_size; + e_hdr_pe32p.image_sz = hdr_sz + so_memsz; e_hdr_pe32p.headers_sz = hdr_sz; e_hdr_pe32p.subsystem = IMAGE_SUBSYSTEM_EFI_APPLICATION; e_hdr_pe32p.rva...
2013 Nov 27
0
[PATCH 4/4] efi: PE file size differ from in-memory size
...r.image_sz = hdr_sz + so_memsz; e_hdr.headers_sz = hdr_sz; e_hdr.subsystem = IMAGE_SUBSYSTEM_EFI_APPLICATION; e_hdr.rva_and_sizes_nr = sizeof(e_hdr.data_directory) / sizeof(__uint64_t); @@ -119,7 +119,7 @@ static void write_header(FILE *f, __uint32_t entry, size_t data_size, memset(&e_hdr_pe32p, 0, sizeof(e_hdr_pe32p)); e_hdr_pe32p.section_align = 4096; e_hdr_pe32p.file_align = 512; - e_hdr_pe32p.image_sz = hdr_sz + so_size; + e_hdr_pe32p.image_sz = hdr_sz + so_memsz; e_hdr_pe32p.headers_sz = hdr_sz; e_hdr_pe32p.subsystem = IMAGE_SUBSYSTEM_EFI_APPLICATION; e_hdr_pe32p.rva...
2012 Nov 09
1
Syslinux-6.00-pre1
...guments to initrd= firmware: Add EFI linux boot support efi: Delete efi/wrapper in spotless make target Merge branch 'linux-boot' into for-hpa/elflink/firmware firmware, diskio: Create struct disk_private firmware: Fix assorted compiler warnings efi: Zero e_hdr_pe32p before use Merge remote-tracking branch 'mfleming/elflink' into for-hpa/elflink/firmware core: Change numIPAppends data type Merge remote-tracking branch 'mfleming/elflink' into for-hpa/elflink/firmware efi, ansi: Improve console handling even further (e.g. s...
2013 Jun 20
9
Syslinux 6.00 released
...guments to initrd= firmware: Add EFI linux boot support efi: Delete efi/wrapper in spotless make target Merge branch 'linux-boot' into for-hpa/elflink/firmware firmware, diskio: Create struct disk_private firmware: Fix assorted compiler warnings efi: Zero e_hdr_pe32p before use Merge remote-tracking branch 'mfleming/elflink' into for-hpa/elflink/firmware core: Change numIPAppends data type Merge remote-tracking branch 'mfleming/elflink' into for-hpa/elflink/firmware efi, ansi: Improve console handling even further (e.g. s...