diff options
Diffstat (limited to 'docs/Extensions.rst')
-rw-r--r-- | docs/Extensions.rst | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/docs/Extensions.rst b/docs/Extensions.rst index 2b12123cdf68..14fea30204b4 100644 --- a/docs/Extensions.rst +++ b/docs/Extensions.rst @@ -204,9 +204,49 @@ For example, the following code creates two sections named ``.text``. The unique number is not present in the resulting object at all. It is just used in the assembler to differentiate the sections. +The 'o' flag is mapped to SHF_LINK_ORDER. If it is present, a symbol +must be given that identifies the section to be placed is the +.sh_link. + +.. code-block:: gas + + .section .foo,"a",@progbits + .Ltmp: + .section .bar,"ao",@progbits,.Ltmp + +which is equivalent to just + +.. code-block:: gas + + .section .foo,"a",@progbits + .section .bar,"ao",@progbits,.foo + + Target Specific Behaviour ========================= +X86 +--- + +Relocations +^^^^^^^^^^^ + +``@ABS8`` can be applied to symbols which appear as immediate operands to +instructions that have an 8-bit immediate form for that operand. It causes +the assembler to use the 8-bit form and an 8-bit relocation (e.g. ``R_386_8`` +or ``R_X86_64_8``) for the symbol. + +For example: + +.. code-block:: gas + + cmpq $foo@ABS8, %rdi + +This causes the assembler to select the form of the 64-bit ``cmpq`` instruction +that takes an 8-bit immediate operand that is sign extended to 64 bits, as +opposed to ``cmpq $foo, %rdi`` which takes a 32-bit immediate operand. This +is also not the same as ``cmpb $foo, %dil``, which is an 8-bit comparison. + Windows on ARM -------------- |