NLIST(3)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 15.1

✨ NLIST(3) β€” retrieve symbol table name list from an executable file ✨

okay bestie, welcome to the Library Functions Manual page for nlist(3) πŸ’… this one is short but it’s giving β€œniche Unix lore” and we’re gonna get into it.


πŸ“› NAME

nlist β€” retrieve symbol table name list from an executable file

πŸ“š LIBRARY

Standard C Library (libc, -lc) β€” she’s literally in libc, no cap 🫢

πŸ› οΈ SYNOPSIS

#include <nlist.h>

int
nlist(const char *filename, struct nlist *nl);

πŸ’– DESCRIPTION

The nlist() function retrieves name list entries from the symbol table of an executable file (see a.out(5)). The argument nl is set to reference the beginning of the list.

The list is preened of binary and invalid data β€” yes, β€œpreened,” iconic wording πŸ’… β€” and if an entry in the name list is valid, the n_type and n_value for the entry are copied into the list referenced by nl. No other data is copied. The last entry in the list is always NULL.

πŸ” RETURN VALUES

The number of invalid entries is returned if successful. Otherwise, if the file filename does not exist or is not executable, the returned value is -1.

πŸ‘€ SEE ALSO

elf(5) β€” go read that one too, bestie 🌸

πŸ•°οΈ HISTORY

A nlist() function appeared in Version 6 AT&T UNIX. vintage behavior fr fr πŸŽ€


xoxo, Debian πŸ’… β€” April 19, 1994 β€” catch u in NLIST(3) πŸ¦‹

πŸ“¦ where this page comes from
  • freebsd 15.1: base 15.1
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms