diff options
author | Nico Rieck <nico.rieck@gmail.com> | 2013-07-06 12:13:10 +0000 |
---|---|---|
committer | Nico Rieck <nico.rieck@gmail.com> | 2013-07-06 12:13:10 +0000 |
commit | 80646283796b20c6a1b7d8eb69ce6f0478d54383 (patch) | |
tree | 83b9be6b71faffa6cd481cea7736a172d36609ea /docs/Extensions.rst | |
parent | 2be430d251a781e76634e945d56224a7a0ef5a39 (diff) | |
download | external_llvm-80646283796b20c6a1b7d8eb69ce6f0478d54383.zip external_llvm-80646283796b20c6a1b7d8eb69ce6f0478d54383.tar.gz external_llvm-80646283796b20c6a1b7d8eb69ce6f0478d54383.tar.bz2 |
MC: Implement COFF .linkonce directive
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185753 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/Extensions.rst')
-rw-r--r-- | docs/Extensions.rst | 56 |
1 files changed, 55 insertions, 1 deletions
diff --git a/docs/Extensions.rst b/docs/Extensions.rst index 062804a..78ff874 100644 --- a/docs/Extensions.rst +++ b/docs/Extensions.rst @@ -4,7 +4,6 @@ LLVM Extensions .. contents:: :local: - :depth: 1 .. toctree:: :hidden: @@ -21,6 +20,9 @@ Machine-specific Assembly Syntax X86/COFF-Dependent ------------------ +Relocations +^^^^^^^^^^^ + The following additional relocation type is supported: **@IMGREL** (AT&T syntax only) generates an image-relative relocation that @@ -37,3 +39,55 @@ corresponds to the COFF relocation types ``IMAGE_REL_I386_DIR32NB`` (32-bit) or .long fun@IMGREL .long (fun@imgrel + 0x3F) .long $unwind$fun@imgrel + + +``.linkonce`` Directive +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Syntax: + + ``.linkonce [ comdat type [ section identifier ] ]`` + +Supported COMDAT types: + +``discard`` + Discards duplicate sections with the same COMDAT symbol. This is the default + if no type is specified. + +``one_only`` + If the symbol is defined multiple times, the linker issues an error. + +``same_size`` + Duplicates are discarded, but the linker issues an error if any have + different sizes. + +``same_contents`` + Duplicates are discarded, but the linker issues an error if any duplicates + do not have exactly the same content. + +``associative`` + 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: + + 1. It must be the name of a section already defined. + 2. It must differ from the current section. + 3. It must be a COMDAT section. + 4. It cannot be another associative COMDAT section. + +``largest`` + Links the largest section from among the duplicates. + +``newest`` + Links the newest section from among the duplicates. + + +.. code-block:: gas + + .section .text$foo + .linkonce + ... + + .section .xdata$foo + .linkonce associative .text$foo + ... |