unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Page:
Section:
Apropos / Subsearch:
optional field

LDGETNAME(3X)                                                    LDGETNAME(3X)



NAME
       ldgetname - retrieve symbol name for COFF file symbol table entry

SYNOPSIS
       #include <&lt;stdio.h>&gt;
       #include <&lt;filehdr.h>&gt;
       #include <&lt;syms.h>&gt;
       #include <&lt;ldfcn.h>&gt;

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

AVAILABILITY
       Available  only  on  Sun  386i systems running a SunOS 4.0.x release or
       earlier.  Not a SunOS 4.1 release feature.

DESCRIPTION
       ldgetname() returns a pointer to the name associated with symbol  as  a
       string.   The  string  is  contained in a static buffer local to ldget-
       name() that is overwritten by each call to ldgetname(),  and  therefore
       must be copied by the caller if the name is to be saved.

       ldgetname() can be used to retrieve names from object files without any
       backward compatibility problems.  ldgetname() will return NULL (defined
       in  stdio.h)  for an object file if the name cannot be retrieved.  This
       situation can occur:

       o  if the ``string table'' cannot be found,

       o  if not enough memory can be allocated for the string table,

       o  if the string table appears not to be a string table  (for  example,
          if  an  auxiliary  entry  is handed to ldgetname() that looks like a
          reference to a name in a nonexistent string table), or

       o  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 successful
       call to ldtbread() to retrieve the name associated with the symbol  ta-
       ble entry filled by ldtbread().

       The  program must be loaded with the object file access routine library
       libld.a.

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



                               19 February 1988                  LDGETNAME(3X)