From cfb1ab8baec505e25cb1c1c41659ce05c0b028ea Mon Sep 17 00:00:00 2001 From: carlossanlop Date: Mon, 16 Sep 2019 11:51:45 -0700 Subject: [PATCH 1/3] Automatically port Reflection.PortableExecutable.SectionHeader --- .../SectionHeader.xml | 56 +++++++++++++------ 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/xml/System.Reflection.PortableExecutable/SectionHeader.xml b/xml/System.Reflection.PortableExecutable/SectionHeader.xml index 05db7acfd93..1404ed0c259 100644 --- a/xml/System.Reflection.PortableExecutable/SectionHeader.xml +++ b/xml/System.Reflection.PortableExecutable/SectionHeader.xml @@ -49,7 +49,7 @@ System.String - To be added. + The name of the section. To be added. To be added. @@ -75,9 +75,17 @@ System.UInt16 - To be added. + The number of line-number entries for the section. To be added. - To be added. + + + @@ -101,7 +109,7 @@ System.UInt16 - To be added. + The number of relocation entries for the section. This is set to zero for PE images. To be added. To be added. @@ -127,9 +135,18 @@ System.Int32 - To be added. - To be added. - To be added. + The file pointer to the beginning of line-number entries for the section. + + This is set to zero if there are no COFF line numbers. + + + @@ -153,8 +170,9 @@ System.Int32 - To be added. - To be added. + The file pointer to the first page of the section within the COFF file. + For PE images, this must be a multiple of . + 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. To be added. @@ -179,8 +197,8 @@ System.Int32 - To be added. - To be added. + The file pointer to the beginning of relocation entries for the section. + This is set to zero for PE images or if there are no relocations. To be added. @@ -205,7 +223,7 @@ System.Reflection.PortableExecutable.SectionCharacteristics - To be added. + The flags that describe the characteristics of the section. To be added. To be added. @@ -231,8 +249,11 @@ System.Int32 - To be added. - To be added. + The size of the section (for object files) or the size of the initialized data on disk (for image files). + For PE images, this must be a multiple of . + If this is less than , the remainder of the section is zero-filled. + Because the field is rounded but the field is not, it is possible for to be greater than as well. + When a section contains only uninitialized data, this field should be zero. To be added. @@ -258,7 +279,7 @@ To be added. - To be added. + For PE images, the address of the first byte of the section relative to the image base when the section is loaded into memory. For object files, this field 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. To be added. @@ -283,8 +304,9 @@ System.Int32 - To be added. - To be added. + The total size of the section when loaded into memory. + If this value is greater than , the section is zero-padded. + This field is valid only for PE images and should be set to zero for object files. To be added. From 21e894c077f868966ca34c1b2189f8836de5abca Mon Sep 17 00:00:00 2001 From: Ron Petrusha Date: Thu, 26 Sep 2019 15:22:32 -0700 Subject: [PATCH 2/3] Edited file directly. --- .../SectionHeader.xml | 84 ++++++++++++------- 1 file changed, 53 insertions(+), 31 deletions(-) diff --git a/xml/System.Reflection.PortableExecutable/SectionHeader.xml b/xml/System.Reflection.PortableExecutable/SectionHeader.xml index 1404ed0c259..930b4d0b765 100644 --- a/xml/System.Reflection.PortableExecutable/SectionHeader.xml +++ b/xml/System.Reflection.PortableExecutable/SectionHeader.xml @@ -24,7 +24,7 @@ - To be added. + Provides information about the section header of a PE/COFF file. To be added. @@ -49,8 +49,8 @@ System.String - The name of the section. - To be added. + Gets the name of the section. + The name of the section. To be added. @@ -75,8 +75,8 @@ System.UInt16 - The number of line-number entries for the section. - To be added. + Gets the number of line-number entries for the section. + The number of line-number entries for the section. System.UInt16 - The number of relocation entries for the section. This is set to zero for PE images. - To be added. + Gets the number of relocation entries for the section. + the number of relocation entries for the section. Its value is zero for PE images. To be added. @@ -135,9 +135,8 @@ This value should be zero for an image because COFF debugging information is dep System.Int32 - The file pointer to the beginning of line-number entries for the section. - - This is set to zero if there are no COFF line numbers. + Gets the file pointer to the beginning of line-number entries for the section. + The file pointer to the beginning of line-number entries for the section, or zero if there are no COFF line numbers. System.Int32 - The file pointer to the first page of the section within the COFF file. - For PE images, this must be a multiple of . - 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. - To be added. + Gets the file pointer to the first page of the section within the COFF file. + The file pointer to the first page of the section within the COFF file. + + . 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. + + ]]> + @@ -197,8 +201,8 @@ This value should be zero for an image because COFF debugging information is dep System.Int32 - The file pointer to the beginning of relocation entries for the section. - This is set to zero for PE images or if there are no relocations. + Gets the file pointer to the beginning of relocation entries for the section. + 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. To be added. @@ -223,8 +227,8 @@ This value should be zero for an image because COFF debugging information is dep System.Reflection.PortableExecutable.SectionCharacteristics - The flags that describe the characteristics of the section. - To be added. + Gets the flags that describe the characteristics of the section. + The flags that describe the characteristics of the section. To be added. @@ -249,12 +253,19 @@ This value should be zero for an image because COFF debugging information is dep System.Int32 - The size of the section (for object files) or the size of the initialized data on disk (for image files). - For PE images, this must be a multiple of . - If this is less than , the remainder of the section is zero-filled. - Because the field is rounded but the field is not, it is possible for to be greater than as well. - When a section contains only uninitialized data, this field should be zero. - To be added. + Gets the size of the section (for object files) or the size of the initialized data on disk (for image files). + The size of the section (for object files) or the size of the initialized data on disk (for image files). + + . If it is less than , the remainder of the section is zero-filled. + +Because the field is rounded but the field is not, it is possible for to be greater than as well. + +When a section contains only uninitialized data, this field should be zero. + + ]]> + @@ -278,9 +289,15 @@ This value should be zero for an image because COFF debugging information is dep System.Int32 - To be added. - For PE images, the address of the first byte of the section relative to the image base when the section is loaded into memory. For object files, this field 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. - To be added. + Gets the virtual addess of the section. + The virtual address of the section. + + + @@ -304,10 +321,15 @@ This value should be zero for an image because COFF debugging information is dep System.Int32 - The total size of the section when loaded into memory. - If this value is greater than , the section is zero-padded. - This field is valid only for PE images and should be set to zero for object files. - To be added. + Gets the total size of the section when loaded into memory. + The total size of the section when loaded into memory. + + + From 8fc80ff74258646d880ea9a014ba13e28057e436 Mon Sep 17 00:00:00 2001 From: Ron Petrusha Date: Fri, 11 Oct 2019 14:44:51 -0700 Subject: [PATCH 3/3] Update SectionHeader.xml --- xml/System.Reflection.PortableExecutable/SectionHeader.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Reflection.PortableExecutable/SectionHeader.xml b/xml/System.Reflection.PortableExecutable/SectionHeader.xml index 930b4d0b765..74a638912cd 100644 --- a/xml/System.Reflection.PortableExecutable/SectionHeader.xml +++ b/xml/System.Reflection.PortableExecutable/SectionHeader.xml @@ -110,7 +110,7 @@ This value should be zero for an image because COFF debugging information is dep Gets the number of relocation entries for the section. - the number of relocation entries for the section. Its value is zero for PE images. + The number of relocation entries for the section. Its value is zero for PE images. To be added.