Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a symbol that represents the current address in GNU GAS assembly?

Tags:

People also ask

What does Q mean in assembly?

The letter q refers to a “quad” word, or an 8 byte or 64 bit value. Most x86 code these days works with 64 bit or 32 bit values, so you'll most often see instructions that end with q or l. Other suffixes are w for word (16 bits or 2 bytes) or b for 1 byte or 8 bits.

What does GNU assembler do?

The GNU Assembler, commonly known as gas or as, is the assembler developed by the GNU Project. It is the default back-end of GCC. It is used to assemble the GNU operating system and the Linux kernel, and various other software. It is a part of the GNU Binutils package.

Can gas use Intel syntax?

Intel Syntax Support Today, GAS supports both syntax sets (. intel_syntax and the default . att_syntax), and even allows disabling the otherwise mandatory operand prefixes '%' or '$' (... _syntax noprefix).


I am curious to know is there any special GAS syntax to achieve the same like in NASM example:

SECTION .data       

    msg:    db "Hello World",10,0  ; the 0-terminated string.
    len:    equ $-msg              ; "$" means current address.

Especially I'm interested in the symbol $ representing the current address.