comparison docs/Extensions.rst @ 120:1172e4bd9c6f

update 4.0.0
author mir3636
date Fri, 25 Nov 2016 19:14:25 +0900
parents afa8332a0e37
children 803732b1fca8
comparison
equal deleted inserted replaced
101:34baf5011add 120:1172e4bd9c6f
41 41
42 **@IMGREL** (AT&T syntax only) generates an image-relative relocation that 42 **@IMGREL** (AT&T syntax only) generates an image-relative relocation that
43 corresponds to the COFF relocation types ``IMAGE_REL_I386_DIR32NB`` (32-bit) or 43 corresponds to the COFF relocation types ``IMAGE_REL_I386_DIR32NB`` (32-bit) or
44 ``IMAGE_REL_AMD64_ADDR32NB`` (64-bit). 44 ``IMAGE_REL_AMD64_ADDR32NB`` (64-bit).
45 45
46 .. code-block:: gas 46 .. code-block:: text
47 47
48 .text 48 .text
49 fun: 49 fun:
50 mov foo@IMGREL(%ebx, %ecx, 4), %eax 50 mov foo@IMGREL(%ebx, %ecx, 4), %eax
51 51
163 .. code-block:: gas 163 .. code-block:: gas
164 164
165 .section .foo,"bw",discard, "sym" 165 .section .foo,"bw",discard, "sym"
166 .section .bar,"rd",associative, "sym" 166 .section .bar,"rd",associative, "sym"
167 167
168 MC supports these flags in the COFF ``.section`` directive:
169
170 - ``b``: BSS section (``IMAGE_SCN_CNT_INITIALIZED_DATA``)
171 - ``d``: Data section (``IMAGE_SCN_CNT_UNINITIALIZED_DATA``)
172 - ``n``: Section is not loaded (``IMAGE_SCN_LNK_REMOVE``)
173 - ``r``: Read-only
174 - ``s``: Shared section
175 - ``w``: Writable
176 - ``x``: Executable section
177 - ``y``: Not readable
178 - ``D``: Discardable (``IMAGE_SCN_MEM_DISCARDABLE``)
179
180 These flags are all compatible with gas, with the exception of the ``D`` flag,
181 which gnu as does not support. For gas compatibility, sections with a name
182 starting with ".debug" are implicitly discardable.
183
168 184
169 ELF-Dependent 185 ELF-Dependent
170 ------------- 186 -------------
171 187
172 ``.section`` Directive 188 ``.section`` Directive