|
RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
|
Represents an .rsrc resource section in the binary.
More...
#include <peexe.h>
Public Member Functions | |
| bool | IsPresent () const |
| void | Generate (PEFormat &fmt) |
| 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 | 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. | |
Public Member Functions inherited from Microsoft::PEFormat::Section | |
| Section (uint32_t flags=0, std::shared_ptr< Linker::Image > 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 |
Public Member Functions inherited from COFF::COFFFormat::Section | |
| void | Clear () |
| Section (uint32_t flags=0, std::shared_ptr< Linker::Image > image=nullptr) | |
| void | ReadSectionHeader (Linker::Reader &rd, COFFVariantType coff_variant) |
| Reads an entry in the section header table. | |
| void | WriteSectionHeader (Linker::Writer &wr, COFFVariantType coff_variant) |
| 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. | |
Public Member Functions inherited from Microsoft::PEFormat::ResourceDirectory | |
| void | AddResource (std::shared_ptr< Resource > &resource, size_t level=0) |
| Inserts a resource into the directory. | |
Additional Inherited Members | |
Public Attributes inherited from COFF::COFFFormat::Section | |
| 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::Image > | image |
| The stored image data. | |
| std::vector< std::unique_ptr< Relocation > > | relocations |
| Collection of COFF relocations. | |
Public Attributes inherited from Microsoft::PEFormat::ResourceDirectory | |
| uint32_t | flags = 0 |
| Resource directory characteristics. | |
| uint32_t | timestamp = 0 |
| version_type | version = { } |
| std::vector< Entry< std::string > > | name_entries |
| Entries that are identified via a string. | |
| std::vector< Entry< uint32_t > > | id_entries |
| Entries that are identified via a number. | |
Static Public Attributes inherited from Microsoft::PEFormat::Section | |
| 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 Public Attributes inherited from COFF::COFFFormat::Section | |
| static constexpr uint32_t | TEXT = 0x0020 |
| COFF section flag: Section contains executable (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) | |
Represents an .rsrc resource section in the binary.
|
virtual |
Retrieves the size of the section, as stored in the file.
Reimplemented from Microsoft::PEFormat::Section.
|
overridevirtual |
Retrieves the size of the section, as stored in the file.
Reimplemented from Microsoft::PEFormat::Section.
|
overridevirtual |
Retrieves the size of the section, as loaded into memory.
Reimplemented from Microsoft::PEFormat::Section.
|
virtual |
Reads the contents of the section in the file.
Reimplemented from Microsoft::PEFormat::Section.
|
overridevirtual |
Reads the contents of the section in the file.
Reimplemented from Microsoft::PEFormat::Section.
|
virtual |
Writes the contents of the section to the file.
Reimplemented from Microsoft::PEFormat::Section.
|
overridevirtual |
Writes the contents of the section to the file.
Reimplemented from Microsoft::PEFormat::Section.