summaryrefslogtreecommitdiffstats
path: root/llvm/docs/Extensions.rst
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-09-15 15:11:49 +0000
committerReid Kleckner <rnk@google.com>2016-09-15 15:11:49 +0000
commit8ddf07cc546e12ab199ad5ae7bb22e76cd8127ed (patch)
tree6e4ba59e29e24b87c88afa3e913dabb946e33b23 /llvm/docs/Extensions.rst
parent9745983a4d4fc578f5491d9927fcc2c6f69165db (diff)
downloadbcm5719-llvm-8ddf07cc546e12ab199ad5ae7bb22e76cd8127ed.tar.gz
bcm5719-llvm-8ddf07cc546e12ab199ad5ae7bb22e76cd8127ed.zip
Document our extension to the COFF .section directive flags
llvm-svn: 281616
Diffstat (limited to 'llvm/docs/Extensions.rst')
-rw-r--r--llvm/docs/Extensions.rst16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/docs/Extensions.rst b/llvm/docs/Extensions.rst
index f7029215c19..6c50abf192f 100644
--- a/llvm/docs/Extensions.rst
+++ b/llvm/docs/Extensions.rst
@@ -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
-------------
OpenPOWER on IntegriCloud