1,885
edits
Changes
→Compiling an Assembly Language Program using the GNU Assembler
# Run the linker: <code>ls -o ''test'' ''test''.o</code>
Note that the <code>-g</code> option assembled assembles the program with symbolic debugging information included. == Compiling an Asseembly Language Program using the NASM Assembler == # Run the assembler: <code>nasm -g -f elf64 -o ''test''.o ''test''.s</code># Run the linker: <code>ls -o ''test'' ''test''.o</code> Notes:# NASM only works with x86 code.# The source file must be written using NASM syntax (which is substantially different from the GNU assembler syntax).# The <code>-f elf64</code> option instructs NASM to assemble the code for a 64-bit target (x86_64).# The <code>-g</code> option assembles the program with symbolic debugging information included.
== Compiling an Assembly Language program using GCC ==