abi0test

package
v1.82.14 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: BSD-3-Clause Imports: 0 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 abi0test provides ABI0 functions, written in assembler, for testing how libc's Y functions handle C function pointers coming from ABI0 code, like C compiled at run time. The variables hold their ABI0 entry addresses. Got and N record what the functions were called with.

The functions exist on linux/amd64, linux/arm64 and darwin/arm64, the targets with Y functions.

Index

Constants

This section is empty.

Variables

View Source
var (
	Exit42   = exit42Addr()   // void f(void): exits the process with status 42.
	StoreI   = storeIAddr()   // void f(int sig): Got = sig.
	StoreIPP = storeIPPAddr() // void f(int sig, void *info, void *ctx): Got = sig, N = info.
	StoreP   = storePAddr()   // void f(void *arg): Got = arg.
	Entry    = entryAddr()    // void *f(void *arg): return arg+1.
	Write    = writeAddr()    // ssize_t f(void *cookie, char *buf, size_t n): N += n, return n.
	Seek     = seekAddr()     // int f(void *cookie, off_t *off, int whence): return -1.
	Close    = closeAddr()    // int f(void *cookie): Got = cookie, return 0.
	Cmp      = cmpAddr()      // int f(const void *a, const void *b): compares the int64s *a and *b.

	Got int64
	N   int64
)

Functions

func CallXalloca

func CallXalloca(tls, n uintptr) uintptr

CallXalloca calls libc's Xalloca(tls, n) the way ABI0 code does, through its ABI0 entry. It fails to link if libc gives Xalloca no ABI0 wrapper.

func CallYqsort

func CallYqsort(tls, base, nel, width, cmp uintptr)

func CallYstrlen

func CallYstrlen(tls, s uintptr) uint64

CallYstrlen and CallYqsort call the Y wrappers of strlen and qsort, which qbecc --abi0wrap generates, the way ABI0 code does.

Types

This section is empty.

Jump to

Keyboard shortcuts

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