Closed fuhsnn closed 6 months ago
asmfn.s
.text .globl asmfn asmfn: movl $-123, %eax ret .section .note.GNU-stack,"",@progbits
main.c
#include <stdio.h> extern int asmfn(void); int main() { printf("%d\n", asmfn()); }
run
chibicc asmfn.s -xc main.c
got
asmfn.s:1: .text ^ variable name omitted
due to the driver treat .s file as c source
asmfn.s
main.c
run
got
due to the driver treat .s file as c source