Skip to content

Commit e1ccc67

Browse files
carlossanlopRon Petrusha
authored andcommitted
Automatically port Reflection.PortableExecutable.SectionHeader (#3199)
* Automatically port Reflection.PortableExecutable.SectionHeader * Edited file directly. * Update SectionHeader.xml
1 parent 7e9546d commit e1ccc67

File tree

1 file changed

+71
-27
lines changed

1 file changed

+71
-27
lines changed

xml/System.Reflection.PortableExecutable/SectionHeader.xml

Lines changed: 71 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</Attribute>
2525
</Attributes>
2626
<Docs>
27-
<summary>To be added.</summary>
27+
<summary>Provides information about the section header of a PE/COFF file.</summary>
2828
<remarks>To be added.</remarks>
2929
</Docs>
3030
<Members>
@@ -49,8 +49,8 @@
4949
<ReturnType>System.String</ReturnType>
5050
</ReturnValue>
5151
<Docs>
52-
<summary>To be added.</summary>
53-
<value>To be added.</value>
52+
<summary>Gets the name of the section.</summary>
53+
<value>The name of the section.</value>
5454
<remarks>To be added.</remarks>
5555
</Docs>
5656
</Member>
@@ -75,9 +75,17 @@
7575
<ReturnType>System.UInt16</ReturnType>
7676
</ReturnValue>
7777
<Docs>
78-
<summary>To be added.</summary>
79-
<value>To be added.</value>
80-
<remarks>To be added.</remarks>
78+
<summary>Gets the number of line-number entries for the section.</summary>
79+
<value>The number of line-number entries for the section.</value>
80+
<remarks>
81+
<format type="text/markdown"><![CDATA[
82+
83+
## Remarks
84+
85+
This value should be zero for an image because COFF debugging information is deprecated.
86+
87+
]]></format>
88+
</remarks>
8189
</Docs>
8290
</Member>
8391
<Member MemberName="NumberOfRelocations">
@@ -101,8 +109,8 @@
101109
<ReturnType>System.UInt16</ReturnType>
102110
</ReturnValue>
103111
<Docs>
104-
<summary>To be added.</summary>
105-
<value>To be added.</value>
112+
<summary>Gets the number of relocation entries for the section.</summary>
113+
<value>The number of relocation entries for the section. Its value is zero for PE images.</value>
106114
<remarks>To be added.</remarks>
107115
</Docs>
108116
</Member>
@@ -127,9 +135,17 @@
127135
<ReturnType>System.Int32</ReturnType>
128136
</ReturnValue>
129137
<Docs>
130-
<summary>To be added.</summary>
131-
<value>To be added.</value>
132-
<remarks>To be added.</remarks>
138+
<summary>Gets the file pointer to the beginning of line-number entries for the section.</summary>
139+
<value>The file pointer to the beginning of line-number entries for the section, or zero if there are no COFF line numbers.</value>
140+
<remarks>
141+
<format type="text/markdown"><![CDATA[
142+
143+
## Remarks
144+
145+
This value should be zero for an image because COFF debugging information is deprecated.
146+
147+
]]></format>
148+
</remarks>
133149
</Docs>
134150
</Member>
135151
<Member MemberName="PointerToRawData">
@@ -153,9 +169,15 @@
153169
<ReturnType>System.Int32</ReturnType>
154170
</ReturnValue>
155171
<Docs>
156-
<summary>To be added.</summary>
157-
<value>To be added.</value>
158-
<remarks>To be added.</remarks>
172+
<summary>Gets the file pointer to the first page of the section within the COFF file.</summary>
173+
<value>The file pointer to the first page of the section within the COFF file.</value>
174+
<remarks>
175+
<format type="text/markdown"><![CDATA[
176+
177+
For PE images, this must be a multiple of <xref:System.Reflection.PortableExecutable.PEHeader.FileAlignment?displayProperty=nameWithType>. For object files, the value should be aligned on a 4-byte boundary for best performance. When a section contains only uninitialized data, this field should be zero.
178+
179+
]]></format>
180+
</remarks>
159181
</Docs>
160182
</Member>
161183
<Member MemberName="PointerToRelocations">
@@ -179,8 +201,8 @@
179201
<ReturnType>System.Int32</ReturnType>
180202
</ReturnValue>
181203
<Docs>
182-
<summary>To be added.</summary>
183-
<value>To be added.</value>
204+
<summary>Gets the file pointer to the beginning of relocation entries for the section.</summary>
205+
<value>The file pointer to the beginning of relocation entries for the section. It is set to zero for PE images or if there are no relocations.</value>
184206
<remarks>To be added.</remarks>
185207
</Docs>
186208
</Member>
@@ -205,8 +227,8 @@
205227
<ReturnType>System.Reflection.PortableExecutable.SectionCharacteristics</ReturnType>
206228
</ReturnValue>
207229
<Docs>
208-
<summary>To be added.</summary>
209-
<value>To be added.</value>
230+
<summary>Gets the flags that describe the characteristics of the section.</summary>
231+
<value>The flags that describe the characteristics of the section.</value>
210232
<remarks>To be added.</remarks>
211233
</Docs>
212234
</Member>
@@ -231,9 +253,19 @@
231253
<ReturnType>System.Int32</ReturnType>
232254
</ReturnValue>
233255
<Docs>
234-
<summary>To be added.</summary>
235-
<value>To be added.</value>
236-
<remarks>To be added.</remarks>
256+
<summary>Gets the size of the section (for object files) or the size of the initialized data on disk (for image files).</summary>
257+
<value>The size of the section (for object files) or the size of the initialized data on disk (for image files).</value>
258+
<remarks>
259+
<format type="text/markdown"><![CDATA[
260+
261+
For PE images, `SizeOfRawData` must be a multiple of <xref:System.Reflection.PortableExecutable.PEHeader.FileAlignment?displayProperty=nameWithType>. If it is less than <xref:System.Reflection.PortableExecutable.SectionHeader.VirtualSize?displayProperty=nameWithType>, the remainder of the section is zero-filled.
262+
263+
Because the <xref:System.Reflection.PortableExecutable.SectionHeader.SizeOfRawData?displayProperty=nameWithType> field is rounded but the <xref:System.Reflection.PortableExecutable.SectionHeader.VirtualSize?displayProperty=nameWithType> field is not, it is possible for <xref:System.Reflection.PortableExecutable.SectionHeader.SizeOfRawData> to be greater than <xref:System.Reflection.PortableExecutable.SectionHeader.VirtualSize> as well.
264+
265+
When a section contains only uninitialized data, this field should be zero.
266+
267+
]]></format>
268+
</remarks>
237269
</Docs>
238270
</Member>
239271
<Member MemberName="VirtualAddress">
@@ -257,9 +289,15 @@
257289
<ReturnType>System.Int32</ReturnType>
258290
</ReturnValue>
259291
<Docs>
260-
<summary>To be added.</summary>
261-
<value>To be added.</value>
262-
<remarks>To be added.</remarks>
292+
<summary>Gets the virtual addess of the section.</summary>
293+
<value>The virtual address of the section.</value>
294+
<remarks>
295+
<format type="text/markdown"><![CDATA[
296+
297+
For PE images, the `VirtualAddress` is the address of the first byte of the section relative to the image base when the section is loaded into memory. For object files, it is the address of the first byte before relocation is applied; for simplicity, compilers should set this to zero. Otherwise, it is an arbitrary value that is subtracted from offsets during relocation..
298+
299+
]]></format>
300+
</remarks>
263301
</Docs>
264302
</Member>
265303
<Member MemberName="VirtualSize">
@@ -283,9 +321,15 @@
283321
<ReturnType>System.Int32</ReturnType>
284322
</ReturnValue>
285323
<Docs>
286-
<summary>To be added.</summary>
287-
<value>To be added.</value>
288-
<remarks>To be added.</remarks>
324+
<summary>Gets the total size of the section when loaded into memory.</summary>
325+
<value>The total size of the section when loaded into memory.</value>
326+
<remarks>
327+
<format type="text/markdown"><![CDATA[
328+
329+
If the `VirtualSize` property value is greater than <xref:System.Reflection.PortableExecutable.SectionHeader.SizeOfRawData, the section is zero-padded. This field is valid only for PE images and should be set to zero for object files.
330+
331+
]]></format>
332+
</remarks>
289333
</Docs>
290334
</Member>
291335
</Members>

0 commit comments

Comments
 (0)