Go: cmd/link/internal/loadelf Index | Files

package loadelf

import "cmd/link/internal/loadelf"

Package loadelf implements an ELF file reader.


Package Files



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

func Load Uses

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.

type ElfObj Uses

type ElfObj struct {
    // contains filtered or unexported fields

type ElfSect Uses

type ElfSect struct {
    // contains filtered or unexported fields

type ElfSym Uses

type ElfSym struct {
    // contains filtered or unexported fields

Package loadelf imports 12 packages (graph) and is imported by 2 packages. Updated 2020-12-11. Refresh now. Tools for package owners.

The go get command cannot install this package because of the following issues: