mirror of
https://git.suyu.dev/suyu/Yucom.git
synced 2026-01-04 21:54:42 +01:00
build: Fixup .text section flags using objcopy and assert in pefixup.
This commit is contained in:
parent
47fe4a8063
commit
88064f86ee
2 changed files with 4 additions and 4 deletions
|
|
@ -10,7 +10,7 @@ for path in sys.argv[1:]:
|
|||
|
||||
for section in pe.sections:
|
||||
if section.Name.decode("utf-8")[0:5] == ".text":
|
||||
section.Characteristics &= ~pefile.SECTION_CHARACTERISTICS['IMAGE_SCN_CNT_INITIALIZED_DATA']
|
||||
assert not (section.Characteristics & pefile.SECTION_CHARACTERISTICS['IMAGE_SCN_CNT_INITIALIZED_DATA'])
|
||||
assert not (section.Characteristics & pefile.SECTION_CHARACTERISTICS['IMAGE_SCN_ALIGN_MASK'])
|
||||
|
||||
pe.OPTIONAL_HEADER.CheckSum = pe.generate_checksum()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue