Answer the question
In order to leave comments, you need to log in
NASM - Why do I get different byte codes for one asm file (compilations to elf and binary output to a file)?
Hello!
There is a simple asm code (only for an example - for point ... although it was possible to consider "Hello world" as well). xor eax, eax
I do the following:
1. I compile to elf and look at the code section (opcodes are the same as x32):
nasm -f elf64 xor.s -o xor_x64
objdump -d xor_x64
nasm -o bin_xor xor.s
hexdump bin_xor
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question