summaryrefslogtreecommitdiff
path: root/docs/Extensions.rst
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-05-27 18:44:32 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-05-27 18:44:32 +0000
commit5a5ac124e1efaf208671f01c46edb15f29ed2a0b (patch)
treea6140557876943cdd800ee997c9317283394b22c /docs/Extensions.rst
parentf03b5bed27d0d2eafd68562ce14f8b5e3f1f0801 (diff)
Diffstat (limited to 'docs/Extensions.rst')
-rw-r--r--docs/Extensions.rst23
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/Extensions.rst b/docs/Extensions.rst
index 271c08598b3f2..c8ff07c2b0ca2 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
=========================