mirror of https://github.com/ipxe/ipxe.git
[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>pull/41/head
parent
bd96c6fffd
commit
ed609c4889
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue