APIdia Launch Partner
Top Description Methods
sun.jvm.hotspot.debugger.win32.coff

public Interface SectionHeader

Known Direct Implementers
sun.jvm.hotspot.debugger.win32.coff.COFFFileParser.COFFFileImpl.COFFHeaderImpl.SectionHeaderImpl

Describes the header of a section in a COFF file. The section headers are grouped together into the Section Table. (Some of the descriptions are taken directly from Microsoft's documentation and are copyrighted by Microsoft.)

Method Summary

Modifier and TypeMethod and Description
public COFFLineNumber
getCOFFLineNumber(int index)

Retrieves the COFF line number at the given index; valid indices are numbered 0...getNumberOfLineNumbers() - 1.

public COFFRelocation
getCOFFRelocation(int index)

This is only present for object files.

public String
public short
getNumberOfLineNumbers()

Number of line-number entries for the section.

public short
getNumberOfRelocations()

Number of relocation entries for the section.

public int
getPointerToLineNumbers()

File pointer to beginning of line-number entries for the section.

public int
getPointerToRawData()

File pointer to section's first page within the COFF file.

public int
getPointerToRelocations()

File pointer to beginning of relocation entries for the section.

public int
getSectionFlags()

Flags describing section's characteristics; see sun.jvm.hotspot.debugger.win32.coff.SectionFlags.

public int
getSize()

Total size of the section when loaded into memory.

public int
getSizeOfRawData()

Size of the section (object file) or size of the initialized data on disk (image files).

public int
getVirtualAddress()

For executable images this is the address of the first byte of the section, when loaded into memory, relative to the image base.

public boolean
hasSectionFlag(int flag)

Returns true if the appropriate flag (from sun.jvm.hotspot.debugger.win32.coff.SectionFlags) is set.

Method Detail

getCOFFLineNumberback to summary
public COFFLineNumber getCOFFLineNumber(int index)

Retrieves the COFF line number at the given index; valid indices are numbered 0...getNumberOfLineNumbers() - 1.

getCOFFRelocationback to summary
public COFFRelocation getCOFFRelocation(int index)

This is only present for object files. Retrieves the COFF relocation at the given index; valid indices are numbered 0...getNumberOfRelocations() - 1.

getNameback to summary
public String getName()
getNumberOfLineNumbersback to summary
public short getNumberOfLineNumbers()

Number of line-number entries for the section.

getNumberOfRelocationsback to summary
public short getNumberOfRelocations()

Number of relocation entries for the section. Set to 0 for executable images.

getPointerToLineNumbersback to summary
public int getPointerToLineNumbers()

File pointer to beginning of line-number entries for the section. Set to 0 if there are no COFF line numbers.

getPointerToRawDataback to summary
public int getPointerToRawData()

File pointer to section's first page within the COFF file. For executable images, this must be a multiple of FileAlignment from the optional header. For object files, the value should be aligned on a four-byte boundary for best performance. When a section contains only uninitialized data, this field should be 0.

getPointerToRelocationsback to summary
public int getPointerToRelocations()

File pointer to beginning of relocation entries for the section. Set to 0 for executable images or if there are no relocations.

getSectionFlagsback to summary
public int getSectionFlags()

Flags describing section's characteristics; see sun.jvm.hotspot.debugger.win32.coff.SectionFlags.

getSizeback to summary
public int getSize()

Total size of the section when loaded into memory. If this value is greater than Size of Raw Data, the section is zero-padded. This field is valid only for executable images and should be set to 0 for object files.

getSizeOfRawDataback to summary
public int getSizeOfRawData()

Size of the section (object file) or size of the initialized data on disk (image files). For executable image, this must be a multiple of FileAlignment from the optional header. If this is less than VirtualSize the remainder of the section is zero filled. Because this field is rounded while the VirtualSize field is not it is possible for this to be greater than VirtualSize as well. When a section contains only uninitialized data, this field should be 0.

getVirtualAddressback to summary
public int getVirtualAddress()

For executable images this is the address of the first byte of the section, when loaded into memory, relative to the image base. 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.

hasSectionFlagback to summary
public boolean hasSectionFlag(int flag)

Returns true if the appropriate flag (from sun.jvm.hotspot.debugger.win32.coff.SectionFlags) is set.