Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ldclose(3X)

ldopen(3X)

ldtbread(3X)

ldtbseek(3X)

ldfcn(4)



          LDGETNAME(3X)        INTERACTIVE UNIX System        LDGETNAME(3X)



          NAME
               ldgetname - retrieve symbol name for common object file sym-
               bol table entry

          SYNOPSIS
               #include <stdio.h>
               #include <filehdr.h>
               #include <syms.h>
               #include <ldfcn.h>

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

          DESCRIPTION
               The ldgetname function returns a pointer to the name associ-
               ated with symbol as a string.  The string is contained in a
               static buffer local to ldgetname that is overwritten by each
               call to ldgetname, and therefore 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 function will return NULL (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 is handed to ldget-
                    name that looks like a reference to a name in a nonex-
                    istent string table), or

               -    if the name's offset into the string table is past the
                    end of the string table.

               Typically, ldgetname will be called immediately after a suc-
               cessful 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 rou-
               tine library libld.a.

          SEE ALSO
               ldclose(3X), ldopen(3X), ldtbread(3X), ldtbseek(3X),
               ldfcn(4).





          Rev. C Software Development Set                            Page 1



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