Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ldclose(3X)

ldopen(3X)

ldshread(3X)

ldnshread(3X)

ldsseek(3X)

ldnseek(3x)

ldfcn(4)

LDSGETNAME(3X)                  Domain/OS BSD                   LDSGETNAME(3X)



NAME
     ldsgetname - retrieve section name for common object file entry

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

     char *ldsgetname (ldptr, secthdr)
     LDFILE *ldptr;
     SCNHDR *secthdr;

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

     ldsgetname can be used to retrieve names from object files without any
     backward compatibility problems. ldsgetname will return NULL (defined in
     stdio.h) for an object file if the section name is stored in the string
     table (that is it is more than eight characters long) and cannot be
     retrieved. This situation can occur if:

     ⊕  the "string table" cannot be found,

     ⊕  not enough memory can be allocated for the string table, or

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

     Typically, ldsgetname will be called to retrieve the name associated with
     the section header filled by ldshread or ldnshread.

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

SEE ALSO
     ldclose(3X), ldopen(3X), ldshread(3X), ldnshread(3X), ldsseek(3X),
     ldnseek(3x), ldfcn(4).

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