-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
COFF/PE: Always set paddr and vaddr to 0.
It appears that GNU binutils always interpret PE/COFF object files as if they were executable files, namely that the paddr field is a rounded-up section size (aka virtual size). Yasm previously followed the Microsoft specification which stated that for object files this field should be set to the "physical address" of the section (e.g. the sum of all previous section sizes). However, several other sources state this field should be set to 0 in object files, and it appears that Microsoft tools accept this. For compatibility with the GNU tools, this commit makes Yasm always set the paddr/vsize field to 0. This commit also eliminates the COFF_SET_VMA customization for COFF files. Previously this was used to set LMA=VMA in COFF, but LMA=0 in PE. Now that VMA is always 0, this is no longer required (LMA=VMA=0 in both PE and COFF).
- Loading branch information
1 parent
4c2772c
commit 1910e91
Showing
21 changed files
with
7,743 additions
and
7,794 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.