strip unused functions, rc4, base64

This commit is contained in:
2025-06-13 14:16:02 +02:00
parent de65f383b3
commit a93274d8ac
4 changed files with 125 additions and 9 deletions

View File

@@ -50,7 +50,7 @@ fn compile_file(path: String) -> Result<(), ZernError> {
}
if !Command::new("nasm")
.args(["-f", "elf64", "-w+all", "-o", "out.o", "out.s"])
.args(["-f", "elf64", "-o", "out.o", "out.s"])
.status()
.unwrap()
.success()
@@ -60,7 +60,15 @@ fn compile_file(path: String) -> Result<(), ZernError> {
// TODO: drop libc entirely
if !Command::new("./musl-1.2.4/root/bin/musl-gcc")
.args(["-static", "-o", "out", "out.o"])
.args([
"-static",
"-o",
"out",
"out.o",
"-flto",
"-Os",
"-Wl,--gc-sections",
])
.status()
.unwrap()
.success()