From 8ca44f0b5ca7dbba81e1da5186ed30f4dc44152d Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Sat, 4 Apr 2015 18:02:01 +0000 Subject: Implement unique sections with an unique ID. This allows the compiler/assembly programmer to switch back to a section. This in turn fixes the bootstrap failure on powerpc (tested on gcc110) without changing the ppc codegen at all. I will try to cleanup the various getELFSection overloads in a followup patch. Just using a default argument now would lead to ambiguities. llvm-svn: 234099 --- llvm/docs/Extensions.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'llvm/docs') diff --git a/llvm/docs/Extensions.rst b/llvm/docs/Extensions.rst index 271c08598b3..12eac5e0ed8 100644 --- a/llvm/docs/Extensions.rst +++ b/llvm/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