Displaying 7 results from an estimated 7 matches for "base_relocation_t".
2013 Nov 27
0
[PATCH 1/4] efi: Fix PE header field rva_and_sizes_nr
...i/wrapper.h
@@ -102,12 +102,14 @@ struct extra_hdr {
__uint32_t heap_commit_sz;
__uint32_t loader_flags;
__uint32_t rva_and_sizes_nr;
- __uint64_t export_table;
- __uint64_t import_table;
- __uint64_t resource_table;
- __uint64_t exception_table;
- __uint64_t certification_table;
- __uint64_t base_relocation_table;
+ struct {
+ __uint64_t export_table;
+ __uint64_t import_table;
+ __uint64_t resource_table;
+ __uint64_t exception_table;
+ __uint64_t certification_table;
+ __uint64_t base_relocation_table;
+ } data_directory;
} __packed;
/* Extra header for PE32+ format
@@ -136,12 +138,14 @@ st...
2013 Dec 01
0
[PATCH v2 1/4] efi: Fix PE header field rva_and_sizes_nr
...i/wrapper.h
@@ -102,12 +102,14 @@ struct extra_hdr {
__uint32_t heap_commit_sz;
__uint32_t loader_flags;
__uint32_t rva_and_sizes_nr;
- __uint64_t export_table;
- __uint64_t import_table;
- __uint64_t resource_table;
- __uint64_t exception_table;
- __uint64_t certification_table;
- __uint64_t base_relocation_table;
+ struct {
+ __uint64_t export_table;
+ __uint64_t import_table;
+ __uint64_t resource_table;
+ __uint64_t exception_table;
+ __uint64_t certification_table;
+ __uint64_t base_relocation_table;
+ } data_directory;
} __packed;
/* Extra header for PE32+ format
@@ -136,12 +138,14 @@ st...
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 07
1
[PATCH v2 3/4] efi: Useless relocations in PE file
On 12/01/2013 02:14 PM, Celelibi wrote:
> There is no need to have a relocation section that nothing points at.
> The image is still seen as relocatable as long as the Characteristics of
> the FileHeader do not say otherwise.
>
> Moreover, the field base_relocation_table wasn't initialized properly
> leading to unpredictable bugs.
>
> Signed-off-by: Celelibi <celelibi at gmail.com>
I seem to hear about some UEFI implementations which would fail to boot
unless there is a relocation section... I believe we had to add one to
the Linux kernel f...
2013 Nov 27
0
[PATCH 3/4] efi: Useless relocations in PE file
There is no need to have a relocation section that nothing points at.
The image is still seen as relocatable as long as the Characteristics of
the FileHeader do not say otherwise.
Moreover, the field base_relocation_table wasn't initialized properly
leading to unpredictable bugs.
Signed-off-by: Celelibi <celelibi at gmail.com>
---
I'm not 100% positive about the uselessness of the relocation section. However:
1) it works on my real hardware;
2) OVMF doesn't check the section headers at all;
3...
2013 Dec 01
0
[PATCH v2 3/4] efi: Useless relocations in PE file
There is no need to have a relocation section that nothing points at.
The image is still seen as relocatable as long as the Characteristics of
the FileHeader do not say otherwise.
Moreover, the field base_relocation_table wasn't initialized properly
leading to unpredictable bugs.
Signed-off-by: Celelibi <celelibi at gmail.com>
---
efi/wrapper.c | 28 +++-------------------------
1 file changed, 3 insertions(+), 25 deletions(-)
diff --git a/efi/wrapper.c b/efi/wrapper.c
index 8b553f8..4839e52 100644...
2013 Dec 01
1
[PATCH v2 0/4] efi: PE header generation fix
Here are the fix as suggested.
For patch 2/4 I chosed to hardcore the value 512 instead of computing the
fittest needed value. There are 3 reasons for that.
- The header size may 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