First you will need nasm installed on your machine to compile it.
Write the below assembly code in an editor and save as shell.asm
To compile it use the following commands $nasm -f elf -o shell.o shell.asm and $ld -o shell shell.oTo address this issue we can use the following commands $nasm -f elf64 -o shell.o shell.asm
and $ld -m elf_x86_64 -s -o shell shell.o
Now run it with: ./shell
Comments
Post a Comment