Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dlinfo(3X) — SunOS 5.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ld(1)

ioctl(2)

dlclose(3X)

dldump(3X)

dlerror(3X)

dlmopen(3X)

dlopen(3X)

dlsym(3X)

attributes(5)

dlinfo(3X)

NAME

dlinfo − dynamic load information

SYNOPSIS

cc [ flag ... ] file ... −ldl [ library ... ]

#include <dlfcn.h>

int dlinfo(void ∗handle, int request, void ∗p);

DESCRIPTION

dlinfo() extracts information about a dynamically-loaded object.  This interface is loosely modeled after the ioctl() interface.  request and a third argument with varying type are passed to dlinfo(). The action taken by dlinfo() depends on the value of the request provided.  handle is a value returned from a dlopen() or dlmopen() call. 

The following are possible values for request to be passed into dlinfo():

RTLD_DI_LMID obtains the id for the link-map list upon which the handle is loaded.  p is a Lmid_t pointer ( Lmid_t ∗p).

RTLD_DI_LINKMAP
obtains the Link_map for the handle specified.  p points to a Link_map pointer ( Link_map ∗∗p ).  The actual storage for the Link_map structure is maintained by ld.so.1. 

The Link_map structure includes the following members:

unsigned longl_addr;/∗ base address ∗/
char ∗l_name;/∗ object name ∗/
Elf32_Dyn ∗l_ld;/∗ .dynamic section ∗/
Link_map ∗l_next;/∗ next link object ∗/
Link_map ∗l_prev;/∗ previous link object ∗/
char ∗l_refname;/∗ filter reference name ∗/

l_addr The base address of the object loaded into memory. 

l_name Full name of the loaded object.  This is the filename of the object as referenced by ld.so.1. 

l_ld Points to the SHT_DYNAMIC structure. 

l_next The next Link_map on the link-map list, other objects on the same link-map list as the current object may be examined by following the and l_prev fields. 

l_prev The previous Link_map on the link-map list. 

l_refname
If the object referenced is a filter this field points to the name of the object being filtered.  If the object is not a filter, this field will be 0.  See Linker and Libraries Guide. 

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
MT Level MT-Safe

SEE ALSO

ld(1), ioctl(2), dlclose(3X), dldump(3X), dlerror(3X), dlmopen(3X), dlopen(3X), dlsym(3X), attributes(5)

Linker and Libraries Guide

NOTES

These routines are available to dynamically-linked processes only. 

SunOS 5.6  —  Last change: 24 Jan 1997

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