Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > D

dlgetmodinfo(3C)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

dlgetmodinfo() — retrieve information about a loaded module (program or shared library)

SYNOPSIS

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

#include <dlfcn.h>

uint64_t dlgetmodinfo(int index, struct load_module_desc *desc, size_t desc_size, void *(*read_tgt_mem)(void* buffer, uint64_t ptr, size_t bufsiz, int ident), int ident_parm, uint64_t load_map_parm);

Multithread Usage

Thread safe in libdl.sl but not in libxpdl.sl.

DESCRIPTION

dlgetmodinfo() is one of a family of routines that give the user direct access to the dynamic linking facilities. dlgetmodinfo() retrieves information about a load module from an index specifying the placement of the load module in the dynamic loader's search list. Unlike dlget(), dlgetmodinfo() can retrieve information about a load module in another process. index of -1 requests information about the dynamic loader. An index of -2 requests information about the program file itself. The dlgetmodinfo() routine fills the load_module_desc with information from the matching load module.

The desc, desc_size, read_tgt_mem, ident_parm, and load_map_parm parameters are identical to those for dlmodinfo(). See dlmodinfo(3C).

RETURN VALUE

If successful, dlgetmodinfo() returns a handle for the shared library as defined by the return value from dlopen(). NULL is returned otherwise. The return values are type-converted to uint64_t.

ERRORS

If dlgetmodinfo() fails, a subsequent call to dlerrno() returns one of the following values:

RTLD_ERR_CANT_APPLY_RELOC

Cannot apply relocation in library.

RTLD_ERR_INV_ADDRESS

Invalid address.

RTLD_ERR_INV_BUFFER_ARGUMENT

Invalid descriptor argument.

RTLD_ERR_INV_DESC_VERSION

Invalid descriptor version.

RTLD_ERR_INV_LIB_INDEX

Invalid load module index.

RTLD_ERR_NO_MEMORY

Out of memory.

RTLD_ERR_READ_TGT_MEM_FAILED

read_tgt_mem failed in reading target memory.

RTLD_ERR_SETCANCELSTATE_FAILED

__thread_setcancelstate failed on entry to or exit from dlgetmodinfo().

RTLD_ERR_SIGENABLE_FAILED

sigenable failed on exit from dlgetmodinfo().

RTLD_ERR_SIGINHIBIT_FAILED

siginhibit failed on entry to dlgetmodinfo().

AUTHOR

dlgetmodinfo() was developed by HP.

SEE ALSO

System Tools

exec(2)

System loader.

ld(1)

Invokes the link editor.

Miscellaneous

a.out(4)

Assembler, compiler, and linker output.

dlclose(3C)

Unloads a shared library previously loaded by dlopen().

dlerror(3C)

Returns the last error message recorded by dld.

dlerrno(3C)

Returns an error code for the last error recorded by dld.

dlget(3C)

Returns information about a loaded module.

dlgetname(3C)

Returns the name of the storage containing a load module.

dlopen(3C)

Loads a shared library.

dlsym(3C)

Gets the address of a symbol in a shared library.

dlmodinfo(3C)

Retrieve information about a loaded module (program or shared library).

Texts and Tutorials

HP-UX Linker and Libraries Online User Guide

(See the +help option)

HP-UX Linker and Libraries User's Guide

(See manuals(5) for ordering information)

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.