loadelf

package standard library
go1.26.8 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: BSD-3-Clause Imports: 12 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 loadelf implements an ELF file reader.

Index

Constants

View Source
const (
	TagFile               = 1
	TagCPUName            = 4
	TagCPURawName         = 5
	TagCompatibility      = 32
	TagNoDefaults         = 64
	TagAlsoCompatibleWith = 65
	TagABIVFPArgs         = 28
)
View Source
const (
	SHT_ARM_ATTRIBUTES = 0x70000003
)

Variables

This section is empty.

Functions

func Load

func Load(l *loader.Loader, arch *sys.Arch, localSymVersion int, f *bio.Reader, pkg string, length int64, pn string, initEhdrFlags uint32) (textp []loader.Sym, ehdrFlags uint32, err error)

Load loads the ELF file pn from f. Symbols are installed into the loader, and a slice of the text symbols is returned.

On ARM systems, Load will attempt to determine what ELF header flags to emit by scanning the attributes in the ELF file being loaded. The parameter initEhdrFlags contains the current header flags for the output object, and the returned ehdrFlags contains what this Load function computes. TODO: find a better place for this logic.

Types

type ElfObj

type ElfObj struct {
	// contains filtered or unexported fields
}

type ElfSect

type ElfSect struct {
	// contains filtered or unexported fields
}

type ElfSym

type ElfSym struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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