[llvm] r281616 - Document our extension to the COFF .section directive flags
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 15 08:11:49 PDT 2016
Author: rnk
Date: Thu Sep 15 10:11:49 2016
New Revision: 281616
URL: http://llvm.org/viewvc/llvm-project?rev=281616&view=rev
Log:
Document our extension to the COFF .section directive flags
Modified:
llvm/trunk/docs/Extensions.rst
Modified: llvm/trunk/docs/Extensions.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/Extensions.rst?rev=281616&r1=281615&r2=281616&view=diff
==============================================================================
--- llvm/trunk/docs/Extensions.rst (original)
+++ llvm/trunk/docs/Extensions.rst Thu Sep 15 10:11:49 2016
@@ -165,6 +165,22 @@ and ``.bar`` is associated to ``.foo``.
.section .foo,"bw",discard, "sym"
.section .bar,"rd",associative, "sym"
+MC supports these flags in the COFF ``.section`` directive:
+
+ - ``b``: BSS section (``IMAGE_SCN_CNT_INITIALIZED_DATA``)
+ - ``d``: Data section (``IMAGE_SCN_CNT_UNINITIALIZED_DATA``)
+ - ``n``: Section is not loaded (``IMAGE_SCN_LNK_REMOVE``)
+ - ``r``: Read-only
+ - ``s``: Shared section
+ - ``w``: Writable
+ - ``x``: Executable section
+ - ``y``: Not readable
+ - ``D``: Discardable (``IMAGE_SCN_MEM_DISCARDABLE``)
+
+These flags are all compatible with gas, with the exception of the ``D`` flag,
+which gnu as does not support. For gas compatibility, sections with a name
+starting with ".debug" are implicitly discardable.
+
ELF-Dependent
-------------
More information about the llvm-commits
mailing list