Some Assembly Tricks

Published:
less than 1 minute read

Assume you have a 64 bit program that calls printf

# a.asm
nasm -f elf64 -l a.lst  a.asm
gcc -m64 -o a a.o

Compile

nasm -f elf twoString.asm
ld -m elf_i386 twoString.o -o twoString
./helloworld