1*48352Scael.\" Copyright (c) 1980, 1991 Regents of the University of California. 2*48352Scael.\" All rights reserved. 320403Smckusick.\" 4*48352Scael.\" %sccs.include.redist.man% 520403Smckusick.\" 6*48352Scael.\" @(#)nlist.3 6.2 (Berkeley) 04/19/91 7*48352Scael.\" 8*48352Scael.Dd 9*48352Scael.Dt NLIST 3 10*48352Scael.Os BSD 4 11*48352Scael.Sh NAME 12*48352Scael.Nm nlist 13*48352Scael.Nd retrieve symbol table name list from an executable file 14*48352Scael.Sh SYNOPSIS 15*48352Scael.Fd #include <nlist.h> 16*48352Scael.Ft int 17*48352Scael.Fn nlist "const char *filename" "struct nlist *nl" 18*48352Scael.Sh DESCRIPTION 19*48352ScaelThe 20*48352Scael.Fn nlist 21*48352Scaelfunction 22*48352Scaelretrieves name list entries from the symbol table of an 23*48352Scaelexectutable file. (See 24*48352Scael.Xr a.out 5 . ) 25*48352ScaelThe argument 26*48352Scael.Fa \&nl 27*48352Scaelis set to reference the 28*48352Scaelbeginning of the list. 29*48352ScaelThe list is preened of binary and invalid data; 30*48352Scaelif an entry in the 31*48352Scaelname list is valid, the 32*48352Scael.Fa n_type 33*48352Scaeland 34*48352Scael.Fa n_value 35*48352Scaelfor the entry are copied into the list 36*48352Scaelreferenced by 37*48352Scael.Fa \&nl . 38*48352ScaelNo other data is copied. 39*48352ScaelThe last entry in the list is always 40*48352Scael.Dv NULL . 41*48352Scael.Sh RETURN VALUES 42*48352ScaelThe number of invalid entries is returned if successful; otherwise, 43*48352Scaelif the file 44*48352Scael.Fa filename 45*48352Scaeldoes not exist or is not exectuable, the returned value is \-1. 46*48352Scael.Sh SEE ALSO 47*48352Scael.Xr a.out 5 48*48352Scael.Sh HISTORY 49*48352ScaelA 50*48352Scael.Fn nlist 51*48352Scaelfunction appeared in 52*48352Scael.At v6 . 53