Skip to content

Commit

Permalink
Fix DebugDirectoryEntry size
Browse files Browse the repository at this point in the history
  • Loading branch information
vit9696 committed Mar 2, 2023
1 parent 45a22c0 commit b0152c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ocmtoc changelog

#### v1.0.3
- Verify `__RO_RELOCS` protection level
- Fixed DebugDirectoryEntry size

#### v1.0.2
- Mark `.reloc` and `.debug` as NX
Expand Down
4 changes: 2 additions & 2 deletions efitools/mtoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1627,7 +1627,7 @@ struct ofile *ofile)
/* Entry 6, Debug Directory [.debug] address & size */
if(debug_filename != NULL){
aouthdr.DataDirectory[6][0] = debug_scnhdr->s_vaddr;
aouthdr.DataDirectory[6][1] = debug_scnhdr->s_vsize;
aouthdr.DataDirectory[6][1] = sizeof(struct debug_directory_entry);
}
}
else{
Expand Down Expand Up @@ -1712,7 +1712,7 @@ struct ofile *ofile)
/* Entry 6, Debug Directory [.debug] address & size */
if(debug_filename != NULL){
aouthdr64.DataDirectory[6][0] = debug_scnhdr->s_vaddr;
aouthdr64.DataDirectory[6][1] = debug_scnhdr->s_vsize;
aouthdr64.DataDirectory[6][1] = sizeof(struct debug_directory_entry);
}
}

Expand Down

0 comments on commit b0152c5

Please sign in to comment.