LDGETSTRING(3X) Domain/OS BSD LDGETSTRING(3X)
NAME
ldgetstring - retrieve string from common object file string table
SYNOPSIS
#include <stdio.h>
#include <filehdr.h>
#include <syms.h>
#include <ldfcn.h>
char *ldgetstring (ldptr, offset)
LDFILE *ldptr;
long offset;
DESCRIPTION
ldgetstring returns a pointer to the string associated with offset into
the string table. The string is contained in a static buffer local to
ldgetstring that is overwritten by each call to ldgetstring, and
therefore must be copied by the caller if the string is to be saved.
ldgetstring will return NULL (defined in stdio.h) for an object file if
the string cannot be retrieved. This situation can occur if:
⊕ the "string table" cannot be found,
⊕ not enough memory can be allocated for the string table,
⊕ the offset into the string table is past the end of the string table.
The program must be loaded with the object file access routine library
libld.a.
SEE ALSO
ldclose(3X), ldopen(3X), ldgetname(3X), ldsgetname(3X), ldfcn(4).