Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

intro(3x)

ldclose(3x)

ldopen(3x)

ldtbseek(3x)

ldtbread(3x)

ldfcn(5)

ldgetname(3x)  —  RISC

Name

ldgetname − retrieve symbol name for object file symbol table entry

Syntax

#include <stdio.h>
#include <filehdr.h>
#include <sym.h>
#include <ldfcn.h>

char *ldgetname (ldptr, symbol)
LDFILE * ldptr ;
pSYMR * symbol ;

Description

The ldgetname function returns a pointer to the name associated with symbol as a string.  The string is contained in a static buffer.  Because the buffer can be overwritten by later calls to ldgetname, the caller must copy the buffer if the name is to be saved. 

If the name cannot be retrieved, ldgetname returns null (defined in <stdio.h>) for an object file.  This occurs in the following instances:

•The string table cannot be found

•The name’s offset into the string table is beyond the end of the string table

Typically, ldgetname is called immediately after a successful call to ldtbread. The ldgetname retrieves the name associated with filled by the function, ldtbread. 

See Also

intro(3x), ldclose(3x), ldopen(3x), ldtbseek(3x), ldtbread(3x), ldfcn(5). 

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