Displaying 9 results from an estimated 9 matches for "rva_and_sizes_nr".
2013 Nov 29
1
[PATCH 1/4] efi: Fix PE header field rva_and_sizes_nr
On Wed, 27 Nov, at 02:38:28PM, Celelibi wrote:
> The value of the field rva_and_sizes_nr is used by OVMF to check the
> consistency of the PE file with respect to the field optional_hdr_sz. It
> now have the right value.
>
> Signed-off-by: Celelibi <celelibi at gmail.com>
> ---
> efi/wrapper.c | 6 +++---
> efi/wrapper.h | 28 ++++++++++++++++------------
&...
2013 Nov 27
0
[PATCH 1/4] efi: Fix PE header field rva_and_sizes_nr
The value of the field rva_and_sizes_nr is used by OVMF to check the
consistency of the PE file with respect to the field optional_hdr_sz. It
now have the right value.
Signed-off-by: Celelibi <celelibi at gmail.com>
---
efi/wrapper.c | 6 +++---
efi/wrapper.h | 28 ++++++++++++++++------------
2 files changed, 19 insertions(+),...
2013 Dec 01
0
[PATCH v2 1/4] efi: Fix PE header field rva_and_sizes_nr
The value of the field rva_and_sizes_nr is used by OVMF to check the
consistency of the PE file with respect to the field optional_hdr_sz. It
now have the right value.
Signed-off-by: Celelibi <celelibi at gmail.com>
---
efi/wrapper.c | 6 +++---
efi/wrapper.h | 28 ++++++++++++++++------------
2 files changed, 19 insertions(+),...
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 file size differ from in-memory size
efi/i386/syslinux.ld | 4 +-
efi/wrapper.c | 206 ++++++++++++++++---------------------------------
efi/wrapper.h | 28 ++++---
efi/x86_...
2013 Nov 27
0
[PATCH 2/4] efi: Location, size and alignment of .text section
...hdr), 1, f);
memset(&e_hdr, 0, sizeof(e_hdr));
e_hdr.section_align = 4096;
e_hdr.file_align = 512;
- e_hdr.image_sz = total_sz;
- e_hdr.headers_sz = 512;
+ e_hdr.image_sz = hdr_sz + so_size;
+ 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);
- to...
2013 Dec 01
0
[PATCH v2 4/4] efi: PE file size differ from in-memory size
...t32_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_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...
2013 Nov 27
0
[PATCH 4/4] efi: PE file size differ from in-memory size
...t32_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_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...
2013 Dec 01
1
[PATCH v2 0/4] efi: PE header generation fix
...not need to be bigger than this in a near future.
- There is an test in case increasing the header size would be needed.
- It would make the code quite more complex to keep a consistent value
for all the fields when the header size is not known from start.
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 file size differ from in-memory size
efi/i386/syslinux.ld | 4 +-
efi/wrapper.c | 210 +++++++++++++++++--------------------------------
efi/wrapper.h | 28 ++++---
efi/x86_...
2014 Feb 03
0
[PATCH v3 0/5] efi: PE header generation fix
...is rejected by OVMF and the whole .reloc section removal has been made a
separate patch 5/5. This last patch is optional.
Of course they are now based on the lastest master branch.
And last but not least, I signed those patches with my real name. :)
Sylvain Gault (5):
efi: Fix PE header field rva_and_sizes_nr
efi: Location, size and alignment of .text section
efi: Remove buggy relocation in PE file
efi: PE file size differ from in-memory size
efi: Useless relocation section in PE file
efi/i386/syslinux.ld | 4 +-
efi/wrapper.c | 210 +++++++++++++++++-------------------------------...