diff options
author | Michael Brown | 2015-09-01 02:29:23 +0200 |
---|---|---|
committer | Michael Brown | 2015-09-01 02:35:03 +0200 |
commit | ed609c4889d678bdc7f616d7d17494f19c735e90 (patch) | |
tree | ce4c1fb3d36d11433499e4698725be01b0d12db1 /src/util/elf2efi.c | |
parent | [efi] Add definitions of GUIDs observed when booting wdsmgfw.efi (diff) | |
download | ipxe-ed609c4889d678bdc7f616d7d17494f19c735e90.tar.gz ipxe-ed609c4889d678bdc7f616d7d17494f19c735e90.tar.xz ipxe-ed609c4889d678bdc7f616d7d17494f19c735e90.zip |
[efi] Fix debug directory size
The debug directory size specified in the data directory should cover
only the EFI_IMAGE_DEBUG_DIRECTORY_ENTRY structure, not the whole of
the .debug section.
Reported-by: Andreas Hammarskjöld <junior@2PintSoftware.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/util/elf2efi.c')
-rw-r--r-- | src/util/elf2efi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/elf2efi.c b/src/util/elf2efi.c index e68fa5d1..eb8f51ee 100644 --- a/src/util/elf2efi.c +++ b/src/util/elf2efi.c @@ -600,7 +600,7 @@ create_debug_section ( struct pe_header *pe_header, const char *filename ) { debugdir = &(pe_header->nt.OptionalHeader.DataDirectory [EFI_IMAGE_DIRECTORY_ENTRY_DEBUG]); debugdir->VirtualAddress = debug->hdr.VirtualAddress; - debugdir->Size = debug->hdr.Misc.VirtualSize; + debugdir->Size = sizeof ( contents->debug ); return debug; } |