feature: put payload into .rdata option

This commit is contained in:
Dobin
2024-05-09 21:04:37 +01:00
parent 3aa79afd70
commit 900c145557
16 changed files with 178 additions and 78 deletions
+4 -2
View File
@@ -11,6 +11,7 @@ from model import *
from phases.masmshc import masm_shc, Params
from model.carrier import Carrier
from phases.asmparser import parse_asm_file
from model.settings import Settings
logger = logging.getLogger("Compiler")
@@ -21,7 +22,7 @@ def compile_dev(
asm_out: FilePath,
short_call_patching: bool = False,
):
logger.info("--[ Compile C to ASM: {} -> {} ".format(c_in, asm_out))
logger.info("--( Compile C to ASM: {} -> {} ".format(c_in, asm_out))
# Compile C To Assembly (text)
run_process_checkret([
@@ -51,6 +52,7 @@ def compile(
c_in: FilePath,
asm_out: FilePath,
carrier: Carrier,
settings: Settings,
):
logger.info("--[ Compile C to ASM: {} -> {} ".format(c_in, asm_out))
@@ -68,7 +70,7 @@ def compile(
asm_text = file_readall_text(asm_out)
observer.add_text_file("carrier_asm_orig", asm_text)
asm_text_lines = parse_asm_file(carrier, asm_text) # Fixup assembly file
asm_text_lines = parse_asm_file(carrier, asm_text, settings) # Fixup assembly file
asm_text = masm_shc(asm_text_lines) # Cleanup assembly file
observer.add_text_file("carrier_asm_final", asm_text)