analyze externs and catch undefined function calls

This commit is contained in:
2025-12-19 15:55:31 +01:00
parent fbf28748c7
commit fdcf7eca37
3 changed files with 24 additions and 23 deletions

View File

@@ -100,18 +100,6 @@ impl CodegenX86_64 {
"section .note.GNU-stack
db 0
section .text
"
);
for name in &["malloc", "realloc", "free", "gethostbyname"] {
emit!(&mut self.output, "extern {}", name);
emit!(&mut self.output, "c.{} equ {}", name, name);
}
emit!(
&mut self.output,
"
section .text._builtin_read8
_builtin_read8:
xor rax, rax