ldgetname(3) CLIX ldgetname(3)
NAME
ldgetname - Retrieves symbol name for common object file symbol table
entry
LIBRARY
COFF Object File Manipulation Library (libld.a)
SYNOPSIS
#include <stdio.h>
#include <filehdr.h>
#include <syms.h>
#include <ldfcn.h>
#include "INCDIR/filehdr.h"
#include "INCDIR/syms.h"
#include "INCDIR/ldfcn.h"
char *ldgetname(
LDFILE *ldptr ,
SYMENT *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 local to
ldgetname() that is overwritten by each call to ldgetname(); therefore, it
must be copied by the caller if the name is to be saved.
The ldgetname() function can be used to retrieve names from object files
without any backward compatibility problems. The ldgetname() will return
(defined in stdio.h) for an object file if the name cannot be retrieved.
This situation can occur:
⊕ if the string table cannot be found.
⊕ if not enough memory can be allocated for the string table.
⊕ if the string table appears not to be a string table. For example, if
an auxiliary entry that looks like a reference to a name in a
nonexistent string table is handed to ldgetname() or
⊕ if the name's offset into the string table is past the end of the
string table.
2/94 - Intergraph Corporation 1
ldgetname(3) CLIX ldgetname(3)
Typically, the ldgetname() function will be called immediately after a
successful call to ldtbread() to retrieve the name associated with the
symbol table entry filled by ldtbread().
The program must be loaded with the object file access function library
libld.a.
INCDIR is the standard directory list for #include files, usually
/usr/include. LIBDIR is the set of standard library files, usually /lib.
RETURN VALUES
See the DISCUSSION.
RELATED INFORMATION
Functions: ldclose(3), ldopen(3), ldtbread(3), ldtbseek(3)
Files: ldfcn(0)
2 Intergraph Corporation - 2/94