executable

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 6 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 executable holds what the artifact decomposers for compiled programs share: recognizing an executable by its magic number and reading a named section out of it, whatever its object format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Magic

func Magic(header []byte) bool

Magic reports whether header, the first bytes of a file, opens an executable in one of the formats the decomposers read: ELF, PE or Mach-O (thin, either endianness, 32 or 64 bit).

func Section

func Section(ra io.ReaderAt, name string) ([]byte, error)

Section returns the contents of the named section of the executable, or nil when the file has no such section, is not an executable in a format Section reads, or is a malformed one. Only a failure reading the section data of a well-formed file is an error: a decomposer probing files it does not own must not fail on the ones that are not its business.

Types

This section is empty.

Jump to

Keyboard shortcuts

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