Attribute expressions are used to generate entries of relocation table. The form of the attribute expression is:
symbol-name@attribute
Attributes begin with the @ sign followed by a reserved identifier. Table 3-8 describes the identifier attributes used in the x86 assembler:.
Table 3-8 Identifier Attributes
Attribute |
Description |
Relocation Table Entry Generated |
---|---|---|
@GOT |
Address of the Global Offset Table (GOT) entry for the identifier |
R_386_GOT32 |
@GOTOFF |
The difference between a symbol's value and the Global Offset Table (GOT). |
R_386_GOTOFF |
@PLT |
Address of a function's Procedure Linkage Table ()LT) entry |
R_386_PLT32 |
To obtain correct position-independent code, conform to the Intel 386 Architecture and the System V ABI.
The special symbol _GLOBAL_OFFSET_TABLE_ can be used in the x86 Assembler for building of position-independent code.