This document describes extensions to tools and formats LLVM seeks compatibility with.
LLVM’s assemblers allow floating-point constants to be written in C99’s hexadecimal format instead of decimal if desired.
.section .data
.float 0x1c2.2ap3
The following additional relocation type is supported:
@IMGREL (AT&T syntax only) generates an image-relative relocation that corresponds to the COFF relocation types IMAGE_REL_I386_DIR32NB (32-bit) or IMAGE_REL_AMD64_ADDR32NB (64-bit).
.text
fun:
mov foo@IMGREL(%ebx, %ecx, 4), %eax
.section .pdata
.long fun@IMGREL
.long (fun@imgrel + 0x3F)
.long $unwind$fun@imgrel
Syntax:
.linkonce [ comdat type [ section identifier ] ]
Supported COMDAT types:
Links the section if a certain other COMDAT section is linked. This other section is indicated by its section identifier following the comdat type. The following restrictions apply to the associated section:
.section .text$foo
.linkonce
...
.section .xdata$foo
.linkonce associative .text$foo
...
MC supports passing the information in .linkonce at the end of .section. For example, these two codes are equivalent
.section secName, "dr", discard, "Symbol1"
.globl Symbol1
Symbol1:
.long 1
.section secName, "dr"
.linkonce discard
.globl Symbol1
Symbol1:
.long 1
Note that in the combined form the COMDAT symbol is explict. This extension exits to support multiple sections with the same name in different comdats:
.section secName, "dr", discard, "Symbol1"
.globl Symbol1
Symbol1:
.long 1
.section secName, "dr", discard, "Symbol2"
.globl Symbol2
Symbol2:
.long 1