image

package
v0.10.0 Latest Latest
Warning

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

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

Documentation

Overview

Package image contains a parser for Arm64 Linux Image format. It assumes little endian arm.

Index

Constants

View Source
const (
	// Magic values used in Image header.
	Magic = 0x644d5241
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Arm64Header

type Arm64Header struct {
	Code0      uint32 `offset:"0x00"`
	Code1      uint32 `offset:"0x04"`
	TextOffset uint64 `offset:"0x08"`
	ImageSize  uint64 `offset:"0x10"`
	Flags      uint64 `offset:"0x18"`
	Res2       uint64 `offset:"0x20"`
	Res3       uint64 `offset:"0x28"`
	Res4       uint64 `offset:"0x30"`
	Magic      uint32 `offset:"0x38"`
	Res5       uint32 `offset:"0x3c"`
}

Arm64Header is header for Arm64 Image.

type Image

type Image struct {
	Header Arm64Header
	Data   []byte
}

Image abstracts Arm64 Image.

func ParseFromBytes

func ParseFromBytes(data []byte) (*Image, error)

ParseFromBytes parse an Image from bytes slice.

Jump to

Keyboard shortcuts

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