Documentation ¶
Index ¶
- Constants
- type Data
- type DataEntry
- type Directory
- type DirectoryEntry
- type Relocation
- type Section
- func (s *Section) AddResourceByID(typ, id int, blob common.Blob) error
- func (s *Section) AddResourceByName(typ int, name string, blob common.Blob) error
- func (s *Section) Name() string
- func (s *Section) Relocations() []coff.Relocation
- func (s *Section) ResourceIDExists(id int) bool
- func (s *Section) ResourceNameExists(name string) bool
- func (s *Section) Size() int
- func (s *Section) WriteTo(w io.Writer) (int64, error)
- type String
Constants ¶
const ( IconResource = 3 IconGroupResource = 14 VersionInfoResource = 16 ManifestResource = 24 )
Common resource types.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataEntry ¶
type DataEntry struct {
// contains filtered or unexported fields
}
DataEntry is a header for Data.
type Directory ¶
type Directory struct {
// contains filtered or unexported fields
}
Directory is the main structure for .rsrc section that can hold subdirectories or data.
type DirectoryEntry ¶
type DirectoryEntry struct {
// contains filtered or unexported fields
}
DirectoryEntry is a header for Directory.
type Relocation ¶
type Relocation struct {
// contains filtered or unexported fields
}
Relocation represents a relocation in .rsrc section.
func (*Relocation) VirtualAddress ¶
func (r *Relocation) VirtualAddress() uint32
VirtualAddress returns a virtual address where the relocation should be applied to.
type Section ¶
type Section struct {
// contains filtered or unexported fields
}
Section represents the .rsrc section in PE file.
func (*Section) AddResourceByID ¶
AddResourceByID adds resource blob with arbitrary type identified by an integer id into the section.
func (*Section) AddResourceByName ¶
AddResourceByName adds resource blob with arbitrary type identified by a name into the section.
func (*Section) Relocations ¶
func (s *Section) Relocations() []coff.Relocation
Relocations returns relocations that should be applied to the section.
func (*Section) ResourceIDExists ¶
ResourceIDExists returns true if a resource with given integer id exists.
func (*Section) ResourceNameExists ¶
ResourceNameExists returns true if a resource with given name exists.