section

package
v0.36.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Unwrapped = errors.New("section unwrapped") //lint:ignore ST1012 special

Functions

func CheckConsumption added in v0.34.0

func CheckConsumption(load *loader.L, payloadOffset int64, payloadSize uint32, partial bool)

func Find

func Find(
	findID module.SectionID,
	load *loader.L,
	mapper ModuleMapper,
	customLoader func(binary.Reader, uint32) error,
) (int64, module.SectionID)

func LoadPayloadSize added in v0.34.0

func LoadPayloadSize(
	sectionOffset int64,
	id module.SectionID,
	load *loader.L,
	mapper ModuleMapper,
) uint32

Types

type ModuleMapper added in v0.34.0

type ModuleMapper interface {
	// PutSection is invoked just after the payload length has been read.
	// Section offset is the position of the section id.  Section size covers
	// section id byte, encoded payload length, and payload content.
	PutSection(sectionID byte, sectionOffset int64, sectionSize, payloadSize uint32) error
}

ModuleMapper gathers information about positions of WebAssembly sections.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL