
Assembly
Organise Assembly Into .text, .data, .bss and .rodata Sections
Put code, constants, variables and zeroed buffers into the right ELF sections in NASM and GNU as, and see how segments and permissions follow from them.
6 min read
Tag
4 posts

Put code, constants, variables and zeroed buffers into the right ELF sections in NASM and GNU as, and see how segments and permissions follow from them.

Assemble a GNU as source file on Linux x86-64 and link it three ways: with ld as a freestanding program, with gcc and libc, and with gcc driving as itself.

Read x86 assembly in Intel and AT&T syntax with a six-rule translation method, a side-by-side table of operands and addressing, and a guide to choosing one.

A full guide to x86 assembler syntax: Intel and AT&T operand order, NASM and GNU as directives, addressing modes, sections, macros, linking and porting.