Document our extension to the COFF .section directive flags

llvm-svn: 281616
This commit is contained in:
Reid Kleckner 2016-09-15 15:11:49 +00:00
parent 9745983a4d
commit 8ddf07cc54
1 changed files with 16 additions and 0 deletions

View File

@ -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
-------------