Retrieves symbol name for common object file symbol table entry.
Object File Access Routine Library (libld.a)
#include <stdio.h> #include <filehdr.h> #include <syms.h> #include <ldfcn.h>
char *ldgetname (ldPointer, Symbol) LDFILE *ldPointer; SYMENT *Symbol;
The ldgetname subroutine returns a pointer to the name associated with Symbol as a string. The string is in a static buffer local to the ldgetname subroutine that is overwritten by each call to the ldgetname subroutine and must therefore be copied by the caller if the name is to be saved.
The common object file format handles arbitrary length symbol names with the addition of a string table. The ldgetname subroutine returns the symbol name associated with a symbol table entry for an XCOFF-format object file.
|ldPointer||Points to the LDFILE structure that was returned as the result of a successful call to the ldopen or ldaopen subroutine.|
|Symbol||Points to an initialized SYMENT structure.|
The ldgetname subroutine returns a null value (defined in the stdio.h file) for a COFF-format object file if the name cannot be retrieved. This situation can occur if one of the following is true:
Typically, the ldgetname subroutine is called immediately after a successful call to the ldtbread subroutine to retrieve the name associated with the symbol table entry filled by the ldtbread subroutine.
This subroutine is part of Base Operating System (BOS) Runtime.
The ldahread subroutine, ldfhread subroutine, ldlread, ldlinit, or ldlitem subroutine, ldshread or ldnshread subroutine, ldtbread subroutine.
Subroutines Overview in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.