소스 검색

[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>
tags/v1.20.1
Michael Brown 8 년 전
부모
커밋
ed609c4889
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      src/util/elf2efi.c

+ 1
- 1
src/util/elf2efi.c 파일 보기

@@ -600,7 +600,7 @@ create_debug_section ( struct pe_header *pe_header, const char *filename ) {
600 600
 	debugdir = &(pe_header->nt.OptionalHeader.DataDirectory
601 601
 		     [EFI_IMAGE_DIRECTORY_ENTRY_DEBUG]);
602 602
 	debugdir->VirtualAddress = debug->hdr.VirtualAddress;
603
-	debugdir->Size = debug->hdr.Misc.VirtualSize;
603
+	debugdir->Size = sizeof ( contents->debug );
604 604
 
605 605
 	return debug;
606 606
 }

Loading…
취소
저장