Nico Rieck | 18d49ac | 2013-04-10 23:28:17 +0000 | [diff] [blame^] | 1 | =============== |
| 2 | LLVM Extensions |
| 3 | =============== |
| 4 | |
| 5 | .. contents:: |
| 6 | :local: |
| 7 | :depth: 1 |
| 8 | |
| 9 | .. toctree:: |
| 10 | :hidden: |
| 11 | |
| 12 | Introduction |
| 13 | ============ |
| 14 | |
| 15 | This document describes extensions to tools and formats LLVM seeks compatibility |
| 16 | with. |
| 17 | |
| 18 | Machine-specific Assembly Syntax |
| 19 | ================================ |
| 20 | |
| 21 | X86/COFF-Dependent |
| 22 | ------------------ |
| 23 | |
| 24 | The following additional relocation type is supported: |
| 25 | |
| 26 | **@IMGREL** (AT&T syntax only) generates an image-relative relocation that |
| 27 | corresponds to the COFF relocation types ``IMAGE_REL_I386_DIR32NB`` (32-bit) or |
| 28 | ``IMAGE_REL_AMD64_ADDR32NB`` (64-bit). |
| 29 | |
| 30 | .. code-block:: gas |
| 31 | |
| 32 | .text |
| 33 | fun: |
| 34 | mov foo@IMGREL(%ebx, %ecx, 4), %eax |
| 35 | |
| 36 | .section .pdata |
| 37 | .long fun@IMGREL |
| 38 | .long (fun@imgrel + 0x3F) |
| 39 | .long $unwind$fun@imgrel |