Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ldgetname(3X) — A/UX 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ldclose(3X)

ldfcn(3X)

ldopen(3X)

ldtbseek(3X)

ldtbread(3X)




ldgetname(3X) ldgetname(3X)
NAME ldgetname - retrieve symbol name for object file symbol table entry SYNOPSIS #include <stdio.h> #include <filehdr.h> #include <syms.h> #include <ldfcn.h> char *ldgetname(ldptr, symbol) LDFILE *ldptr; SYMENT *symbol; DESCRIPTION ldgetname returns a pointer to the name associated with sym- bol as a string. The string is contained in a static buffer local to ldgetname. Because the buffer is overwritten by each call to ldgetname, it must be copied by the caller if the name is to be saved. The common object file format has been extended to handle arbitrary length symbol names with the addition of a ``string table.'' ldgetname returns the symbol name associ- ated with a symbol table entry for either an object file or a preobject file. Thus, ldgetname can be used to retrieve names from object files without any backward compatibility problems. Typically, ldgetname is called immediately after a success- ful call to ldtbread to retrieve the name associated with the symbol table entry filled by ldtbread. Programs using this routine should be loaded with the object file access library libld.a. ERRORS ldgetname returns NULL (defined in <stdio.h>) for an object file if the name cannot be retrieved. This occurs when: the string table cannot be found. not enough memory can be allocated for the string table. the string table appears not to be a string table (e.g., if an auxiliary entry is handed to ldgetname that looks like a reference to a name in a nonexistent string table). the name's offset into the string table is beyond the end of the string table. April, 1990 1



ldgetname(3X) ldgetname(3X)
SEE ALSO ldclose(3X), ldfcn(3X), ldopen(3X), ldtbseek(3X), ldtbread(3X). 2 April, 1990

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026