diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-04-04 18:02:01 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-04-04 18:02:01 +0000 |
commit | 8ca44f0b5ca7dbba81e1da5186ed30f4dc44152d (patch) | |
tree | 7327f2fc55e2e63800b1d5070ad1fc05516ac171 /llvm/docs | |
parent | ecc59396d1344f642a2ae5f6fc9e7cb3fb2fab9b (diff) | |
download | bcm5719-llvm-8ca44f0b5ca7dbba81e1da5186ed30f4dc44152d.tar.gz bcm5719-llvm-8ca44f0b5ca7dbba81e1da5186ed30f4dc44152d.zip |
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
Diffstat (limited to 'llvm/docs')
-rw-r--r-- | llvm/docs/Extensions.rst | 23 |
1 files changed, 23 insertions, 0 deletions
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 ========================= |