I'm trying to write a compiler but I am not very good at it. It compiles / assembles without any errors but it gives me segfault at runtime.
Here is how I assemble my assembly source code (on ubuntu linux) :
nasm -f elf64 assembly.asm ld -s -o assembly assembly.o --entry entrypoint ./assembly ; echo $? Here is my assembly source code:
global entrypoint entrypoint: call main main: mov eax, 0 ret Here is what it gives to me :
Segmentation fault (core dumped) ./assembly