syscalls

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package syscalls maps system-call numbers to names per OS/architecture. The built-in tables are embedded text files named "<os>-<arch>" (e.g. linux-amd64, darwin-arm64), one "<number> <name>" per line. A user can supply additional or replacement tables in the same format from a directory (LoadOverrideDir), which take precedence — so an incomplete built-in table can always be extended without rebuilding.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Available

func Available(key string) bool

Available reports whether any table (built-in or override) covers key.

func Key

func Key(format string, a arch.Arch) string

Key returns the "<os>-<arch>" table key for a container format and architecture. Mach-O ⇒ darwin, PE ⇒ windows, everything else ⇒ linux (the dominant ELF OS).

func LoadOverrideDir

func LoadOverrideDir(dir string) (int, error)

LoadOverrideDir loads every "<os>-<arch>" table file in dir as a user override (replacing/extending the built-ins). Returns the number of tables loaded.

func Name

func Name(key string, num int64) (string, bool)

Name resolves num to a syscall name for the os/arch table key, consulting any user override first, then the built-in table. Darwin numbers carry a class in their high byte (0x2000000 = BSD/Unix on x86-64); it is masked off before lookup.

Types

type Table

type Table map[int64]string

Table maps a syscall number to its name for one os/arch.

Jump to

Keyboard shortcuts

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