Hawken
Hawken

Reputation: 2119

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.

Upvotes: 1

Views: 1882

Answers (1)

zwol
zwol

Reputation: 140569

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.

Upvotes: 4

Related Questions