|
| void | ReadSectionData (Linker::Reader &rd, const PEFormat &fmt) override |
| | Reads the contents of the section in the file.
|
| |
| void | WriteSectionData (Linker::Writer &wr, const PEFormat &fmt) const override |
| | Writes the contents of the section to the file.
|
| |
| uint32_t | ImageSize (const PEFormat &fmt) const override |
| | Retrieves the size of the section, as stored in the file.
|
| |
| uint32_t | MemorySize (const PEFormat &fmt) const override |
| | Retrieves the size of the section, as loaded into memory.
|
| |
|
void | ParseDirectoryData (const PEFormat &fmt, uint32_t directory_rva, uint32_t directory_size) |
| | Parses the contents of the directory, after all the section data for the file is loaded.
|
| |
|
void | DumpDirectory (const PEFormat &fmt, Dumper::Dumper &dump, uint32_t directory_rva, uint32_t directory_size) const |
| | Displays the directory contents.
|
| |
|
void | ReadSectionData (Linker::Reader &rd, const COFFFormat &coff_format) override |
| |
| virtual void | ReadSectionData (Linker::Reader &rd, const PEFormat &fmt) |
| | Reads the contents of the section in the file.
|
| |
|
void | WriteSectionData (Linker::Writer &wr, const COFFFormat &coff_format) const override |
| |
| virtual void | WriteSectionData (Linker::Writer &wr, const PEFormat &fmt) const |
| | Writes the contents of the section to the file.
|
| |
|
uint32_t | ImageSize (const COFFFormat &coff_format) const override |
| |
| virtual uint32_t | ImageSize (const PEFormat &fmt) const |
| | Retrieves the size of the section, as stored in the file.
|
| |
|
| Section (uint32_t flags=0, std::shared_ptr< Linker::Contents > image=nullptr) |
| |
|
constexpr offset_t & | virtual_size () |
| | The COFF s_paddr field is redefined to contain the size of the section as loaded into memory.
|
| |
|
constexpr const offset_t & | virtual_size () const |
| | The COFF s_paddr field is redefined to contain the size of the section as loaded into memory.
|
| |
|
void | ReadSectionData (Linker::Reader &rd, const COFFFormat &coff_format) override |
| |
|
void | WriteSectionData (Linker::Writer &wr, const COFFFormat &coff_format) const override |
| |
|
uint32_t | ImageSize (const COFFFormat &coff_format) const override |
| |
|
void | Dump (Dumper::Dumper &dump, const COFFFormat &format, unsigned section_index) const override |
| |
|
size_t | ReadData (size_t bytes, size_t offset, void *buffer) const |
| |
|
void | Clear () |
| |
|
| Section (uint32_t flags=0, std::shared_ptr< Linker::Contents > image=nullptr) |
| |
|
bool | PresentInFile (COFFVariantType coff_variant) const |
| |
|
bool | PresentInMemory (COFFVariantType coff_variant) const |
| |
|
void | ReadSectionHeader (Linker::Reader &rd, COFFFormat &coff_format) |
| | Reads an entry in the section header table.
|
| |
|
void | WriteSectionHeader (Linker::Writer &wr, const COFFFormat &coff_format) |
| | Writes an entry in the section header table.
|
| |
|
virtual uint32_t | ImageSize (const COFFFormat &coff_format) const |
| | Retrieves the size of the section (for PE, the size of the section as stored in the file)
|
| |
|
virtual void | ReadSectionData (Linker::Reader &rd, const COFFFormat &coff_format) |
| | Reads the section contents from a stream, can be overloaded by subclasses.
|
| |
|
virtual void | WriteSectionData (Linker::Writer &wr, const COFFFormat &coff_format) const |
| | Writes the section contents to a stream, can be overloaded by subclasses.
|
| |
|
virtual void | Dump (Dumper::Dumper &dump, const COFFFormat &format, unsigned section_index) const |
| | Displays the section information and contents.
|
| |
|
|
std::string | name |
| | The name of the section (COFF name: s_name)
|
| |
| offset_t | physical_address = 0 |
| | The physical address of the section (expected to be identical to the virtual address) (COFF name: s_paddr)
|
| |
|
offset_t | address = 0 |
| | The virtual address of the section (COFF name: s_vaddr)
|
| |
|
offset_t | size = 0 |
| | The size of the section (COFF name: s_size)
|
| |
|
offset_t | section_pointer = 0 |
| | Offset of stored image data from COFF header start (COFF name: s_scnptr)
|
| |
|
offset_t | relocation_pointer = 0 |
| | Offset to COFF relocations (COFF name: s_relptr)
|
| |
|
offset_t | line_number_pointer = 0 |
| | unused (COFF name: s_lnnoptr)
|
| |
|
uint32_t | relocation_count = 0 |
| | COFF relocation count (COFF name: s_nreloc)
|
| |
|
uint32_t | line_number_count = 0 |
| | unused (COFF name: s_nlnno)
|
| |
|
uint32_t | flags = 0 |
| | COFF section flags, determines the type of the section (text, data, bss, etc.) (COFF name: s_flags)
|
| |
|
uint16_t | memory_page_number = 0 |
| | TICOFF specific field.
|
| |
|
std::shared_ptr< Linker::Contents > | image |
| | The stored image data.
|
| |
|
std::vector< std::unique_ptr< Relocation > > | relocations |
| | Collection of COFF relocations.
|
| |
|
static constexpr uint32_t | DISCARDABLE = 0x02000000 |
| | The section is discardable.
|
| |
|
static constexpr uint32_t | EXECUTE = 0x20000000 |
| | The section contains executable code.
|
| |
|
static constexpr uint32_t | READ = 0x40000000 |
| | The section contents are readable to the program.
|
| |
|
static constexpr uint32_t | WRITE = 0x80000000 |
| | The section contents are writable to the program.
|
| |
|
static constexpr uint32_t | TEXT = 0x0020 |
| | COFF section flag: Section contains executable instructions (COFF name: STYP_TEXT)
|
| |
|
static constexpr uint32_t | DATA = 0x0040 |
| | COFF section flag: Section contains initialized data (COFF name: STYP_DATA)
|
| |
|
static constexpr uint32_t | BSS = 0x0080 |
| | COFF section flag: Section contains uninitialized data (COFF name: STYP_BSS)
|
| |