diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:01:22 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:01:22 +0000 |
commit | 71d5a2540a98c81f5bcaeb48805e0e2881f530ef (patch) | |
tree | 5343938942df402b49ec7300a1c25a2d4ccd5821 /docs/Extensions.rst | |
parent | 31bbf64f3a4974a2d6c8b3b27ad2f519caf74057 (diff) |
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 -------------- |