Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 71 additions & 27 deletions xml/System.Reflection.PortableExecutable/SectionHeader.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</Attribute>
</Attributes>
<Docs>
<summary>To be added.</summary>
<summary>Provides information about the section header of a PE/COFF file.</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
Expand All @@ -49,8 +49,8 @@
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<summary>Gets the name of the section.</summary>
<value>The name of the section.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand All @@ -75,9 +75,17 @@
<ReturnType>System.UInt16</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
<summary>Gets the number of line-number entries for the section.</summary>
<value>The number of line-number entries for the section.</value>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks

This value should be zero for an image because COFF debugging information is deprecated.

]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="NumberOfRelocations">
Expand All @@ -101,8 +109,8 @@
<ReturnType>System.UInt16</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<summary>Gets the number of relocation entries for the section.</summary>
<value>The number of relocation entries for the section. Its value is zero for PE images.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand All @@ -127,9 +135,17 @@
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
<summary>Gets the file pointer to the beginning of line-number entries for the section.</summary>
<value>The file pointer to the beginning of line-number entries for the section, or zero if there are no COFF line numbers.</value>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks

This value should be zero for an image because COFF debugging information is deprecated.

]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="PointerToRawData">
Expand All @@ -153,9 +169,15 @@
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
<summary>Gets the file pointer to the first page of the section within the COFF file.</summary>
<value>The file pointer to the first page of the section within the COFF file.</value>
<remarks>
<format type="text/markdown"><![CDATA[

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.

]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="PointerToRelocations">
Expand All @@ -179,8 +201,8 @@
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<summary>Gets the file pointer to the beginning of relocation entries for the section.</summary>
<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>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand All @@ -205,8 +227,8 @@
<ReturnType>System.Reflection.PortableExecutable.SectionCharacteristics</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<summary>Gets the flags that describe the characteristics of the section.</summary>
<value>The flags that describe the characteristics of the section.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand All @@ -231,9 +253,19 @@
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
<summary>Gets the size of the section (for object files) or the size of the initialized data on disk (for image files).</summary>
<value>The size of the section (for object files) or the size of the initialized data on disk (for image files).</value>
<remarks>
<format type="text/markdown"><![CDATA[

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.

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.

When a section contains only uninitialized data, this field should be zero.

]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="VirtualAddress">
Expand All @@ -257,9 +289,15 @@
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
<summary>Gets the virtual addess of the section.</summary>
<value>The virtual address of the section.</value>
<remarks>
<format type="text/markdown"><![CDATA[

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

]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="VirtualSize">
Expand All @@ -283,9 +321,15 @@
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
<summary>Gets the total size of the section when loaded into memory.</summary>
<value>The total size of the section when loaded into memory.</value>
<remarks>
<format type="text/markdown"><![CDATA[

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.

]]></format>
</remarks>
</Docs>
</Member>
</Members>
Expand Down