Jump to content
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home

Transition Impacts

Tru64 UNIX Software Transition Kit


» HP STK home
» Home
» Overview
» Tools
» Documentation
» Transition impacts
» Identifier types
» Impact list
» Porting to HP-UX
» Glossary
» Help
» Send us feedback
Site maps
» Tru64 UNIX STK
Content starts here

HP-UX 11i v2.0 critical impact:

dladdr - differences in linking library and Dl_info structure (CrCh231)

CC Impacts

Problem description

The dladdr routine exists on Tru64 UNIX and on HP-UX. However, there are some differences.

The dladdr routine is one of a family of routines that give the user direct access to the dynamic linking facilities. The differences between the Tru64 UNIX version and HP-UX version are:

  • On Tru64 UNIX, the dladdr function is in libc. On HP-UX, the dladdr function is in libdl. Since the libc.so on HP-UX is linked against libdl.so, the dladdr symbols can be resolved without adding -ldl to the link line.

  • Thee following extra fields in the Dl_info structure of HP-UX will be reported: dli_size, dli_bind, and dli_type.

  • The dli_fbase field of the Dl_info structure is used differently. On Tru64 UNIX, the dli_fbase field is the base address of the containing object. On HP-UX, the dli_fbase field contains a handle to the load module that can be used as the first argument to the dlsym routine.

  • For a text symbol, the dli_saddr field on HP-UX contains the address of the OPD (Official Plabel Descriptor) for the nearest code symbol, not the actual symbol address as on Tru64 UNIX.


C/C++ Functionsdladdr          

See also

Solution description

Check your application code to see if changes are needed to properly utilize the data returned in the Dl_info structure.

A version of dladdr existed in Version 1.0 of the Tru64 UNIX Migration Environment for HP-UX, but has since been removed as of Version 1.1. HP recommends that you use the native version available on HP-UX.

See also

Problem summary

classifications source types OS release severity type
CC C, C++ HP-UX 11i v2.0 critical changed
Printable version
Privacy statement Using this site means you accept its terms Feedback to DSPP
© 2007 Hewlett-Packard Development Company, L.P.