pe

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package pe handles appending sections to PE files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssembleNative

func AssembleNative(srcPath, dstPath string, sections []Section) error

AssembleNative is a helper function to assemble the PE file without external programs.

func AssembleObjcopy

func AssembleObjcopy(ctx context.Context, srcPath, dstPath string, sections []Section) error

AssembleObjcopy is a helper function to assemble the PE file using objcopy.

Types

type AssetInfo

type AssetInfo struct {
	io.Closer

	Kernel  io.Reader
	Initrd  io.Reader
	Cmdline io.Reader
}

AssetInfo contains the kernel, initrd, and cmdline from a PE file.

func Extract

func Extract(ukiPath string) (assetInfo AssetInfo, err error)

Extract extracts the kernel, initrd, and cmdline from a PE file.

type Section

type Section struct {
	// Section name.
	Name string
	// Path to the contents of the section.
	Path string
	// Should the section be measured to the TPM?
	Measure bool
	// Should the section be appended, or is it already in the PE file.
	Append bool
	// contains filtered or unexported fields
}

Section is a UKI file section.

Jump to

Keyboard shortcuts

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