Search code examples
assemblygnu-assembleratt

Gnu AS equivalent of ORG in NASM


What would be the equivalent directive in GAS for the ORG (origin) directive in NASM?

EDIT: A warning to all: .org is not the origin directive, it seems to instead pad the assembled file with 00 up to the specified address.


Solution

  • I don't know beans about NASM, but I have the impression that it includes functionality that, in GNU toolchain land, is considered the linker's responsibility, not the assembler's.

    You may need to mark up your assembly sources with custom .section directives and then write a linker script to put each section at the desired address.