pclnmap

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package pclnmap encodes LLGo's optional external runtime-symbolization map. The runtime has a deliberately dependency-free decoder for the same format; keep the layout constants and validation rules in sync with runtime/internal/lib/runtime/pclntab_external.go.

Index

Constants

View Source
const (
	Magic      = "LLGOPCL1"
	Version    = uint32(4)
	ABIVersion = uint32(1)
	HeaderSize = uint32(256)

	EndianLittle = uint8(1)

	GOOSLinux  = uint8(1)
	GOOSDarwin = uint8(2)

	GOARCHAMD64 = uint8(1)
	GOARCHARM64 = uint8(2)
)

Variables

This section is empty.

Functions

func Encode

func Encode(data Data) ([]byte, error)

Encode returns one deterministic, versioned sidecar image.

Types

type Data

type Data struct {
	GOOS        string
	GOARCH      string
	PointerSize int
	ImageBase   uint64
	TextStart   uint64
	TextEnd     uint64
	Identity    [32]byte
	Table       funcinfo.Table
	SymbolIndex []SymbolIndexEntry
	EntrySites  []Site
	PCSites     []Site
}

Data is the complete immutable payload needed by the external runtime loader. EntrySites are physical function entries normalized and LTO-deduplicated by the post-link analyzer. Compiler-generated wrappers and adapters use ordinary function records and entry sites; calling conventions and closure environment transport are deliberately not represented here.

type Section

type Section struct {
	Offset uint64
	Count  uint64
}

type Site

type Site struct {
	PCOffset uint64
	ID       uint64
}

Site is a final linked PC expressed relative to the image base. ID is a symbol ID for EntrySites and a pcline record ID for PCSites.

type SymbolIndexEntry

type SymbolIndexEntry struct {
	SymbolID  uint64
	FuncIndex uint32
}

SymbolIndexEntry maps the stable symbol hash carried by a link-phase site record to the one-based funcinfo table index used by the runtime.

type View

type View struct {
	GOOSCode, GOARCHCode uint8
	PointerSize          uint8
	ImageBase            uint64
	TextStartOffset      uint64
	TextEndOffset        uint64
	Identity             [32]byte
	Sections             [descCount]Section
}

View describes validated sections in an encoded map. It is primarily used by tests and build tooling; the runtime publishes zero-copy typed views.

func Parse

func Parse(raw []byte) (View, error)

Parse validates the common header, checksum and all section bounds.

Jump to

Keyboard shortcuts

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