search for: o_hdr

Displaying 6 results from an estimated 6 matches for "o_hdr".

Did you mean: e_hdr
2013 Nov 27
0
[PATCH 2/4] efi: Location, size and alignment of .text section
...al_sz += hdr_sz; + entry += hdr_sz; + memset(&hdr, 0, sizeof(hdr)); hdr.msdos_signature = MSDOS_SIGNATURE; @@ -77,11 +81,6 @@ static void write_header(FILE *f, __uint32_t entry, size_t data_size, c_hdr.nr_sections = 2; c_hdr.nr_syms = 1; if (class == ELFCLASS32) { - hdr_sz = sizeof(o_hdr) + sizeof(t_sec) + sizeof(e_hdr) + - 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_I386; c_hdr.characteristics = IMAGE_FILE_32BIT_MACHINE | IMAGE_FILE_DEBUG_STRIPPED | IMAGE_F...
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 Dec 01
0
[PATCH v2 3/4] efi: Useless relocations in PE file
...-------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/efi/wrapper.c b/efi/wrapper.c index 8b553f8..4839e52 100644 --- a/efi/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; __ui...
2013 Nov 27
0
[PATCH 3/4] efi: Useless relocations in PE file
...-------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/efi/wrapper.c b/efi/wrapper.c index bd2c175..9652368 100644 --- a/efi/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; __ui...
2013 Dec 01
0
[PATCH v2 4/4] efi: PE file size differ from in-memory size
...ELFCLASS32), the optional @@ -44,7 +44,7 @@ typedef Elf64_Addr Elf_Addr; * header includes PE32+header fields */ static void write_header(FILE *f, __uint32_t entry, size_t data_size, - __uint32_t so_size, __uint8_t class) + __uint32_t so_memsz, __uint8_t class) { struct optional_hdr o_hdr; struct optional_hdr_pe32p o_hdr_pe32p; @@ -100,7 +100,7 @@ static void write_header(FILE *f, __uint32_t entry, size_t data_size, memset(&e_hdr, 0, sizeof(e_hdr)); e_hdr.section_align = 4096; e_hdr.file_align = 512; - e_hdr.image_sz = hdr_sz + so_size; + e_hdr.image_sz = hdr_sz + s...
2013 Nov 27
0
[PATCH 4/4] efi: PE file size differ from in-memory size
...ELFCLASS32), the optional @@ -44,7 +44,7 @@ typedef Elf64_Addr Elf_Addr; * header includes PE32+header fields */ static void write_header(FILE *f, __uint32_t entry, size_t data_size, - __uint32_t so_size, __uint8_t class) + __uint32_t so_memsz, __uint8_t class) { struct optional_hdr o_hdr; struct optional_hdr_pe32p o_hdr_pe32p; @@ -96,7 +96,7 @@ static void write_header(FILE *f, __uint32_t entry, size_t data_size, memset(&e_hdr, 0, sizeof(e_hdr)); e_hdr.section_align = 4096; e_hdr.file_align = 512; - e_hdr.image_sz = hdr_sz + so_size; + e_hdr.image_sz = hdr_sz + so_...