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 ¶
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 ¶
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 ¶
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.