From 5a5ac124e1efaf208671f01c46edb15f29ed2a0b Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 27 May 2015 18:44:32 +0000 Subject: Vendor import of llvm trunk r238337: https://llvm.org/svn/llvm-project/llvm/trunk@238337 --- docs/Extensions.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'docs/Extensions.rst') diff --git a/docs/Extensions.rst b/docs/Extensions.rst index 271c08598b3f..c8ff07c2b0ca 100644 --- a/docs/Extensions.rst +++ b/docs/Extensions.rst @@ -165,6 +165,29 @@ and ``.bar`` is associated to ``.foo``. .section .foo,"bw",discard, "sym" .section .bar,"rd",associative, "sym" + +ELF-Dependent +------------- + +``.section`` Directive +^^^^^^^^^^^^^^^^^^^^^^ + +In order to support creating multiple sections with the same name and comdat, +it is possible to add an unique number at the end of the ``.seciton`` directive. +For example, the following code creates two sections named ``.text``. + +.. code-block:: gas + + .section .text,"ax",@progbits,unique,1 + nop + + .section .text,"ax",@progbits,unique,2 + nop + + +The unique number is not present in the resulting object at all. It is just used +in the assembler to differentiate the sections. + Target Specific Behaviour ========================= -- cgit v1.2.3