Relocatable Labels

The assembler assumes a flat 32-bit memory space. You can use the expressions listed in the following table to specify the relocation of a 32-bit label.

Note: The assembler for your target processor may not allow all of these expressions.
Table 1. Relocatable Label Expressions
Expression Represents
label The offset from the address of the label to the base of its section, relocated by the section base address. It also is the PC-relative target of a branch or call. It is a 32-bit address.
label@l The low 16-bits of the relocated address of the symbol.
label@h The high 16-bits of the relocated address of the symbol. You can OR this with label@l to produce the full 32-bit relocated address.
label@ha The adjusted high 16-bits of the relocated address of the symbol. You can add this to label@l to produce the full 32-bit relocated address.
label@sdax For labels in a small data section, the offset from the base of the small data section to the label. This syntax is not allowed for labels in other sections.
label@got For processors with a global offset table, the offset from the base of the global offset table to the 32-bit entry for label.