How can I check the internal attributes of shared objects?

On HP-UX, I can use the chatr utility to send reports on various internal attributes of the shared library. This will also allow me to change the internal attributes of the shared libraries that I created.

The chatr utility can report and in some cases modify things like:

  • runtime binding behavior,
  • a list of built-in libraries generated at build time,
  • whether the library will be subject to run-time path lookup,
  • internal names,
  • etc. etc.

Is such a utility available for Solaris?

Edit: Quirky! Thanks to mark4o's answer below, I looked again at the elfdump output for a typical .so system (libm.so.2 on Sol 10). However, and here's the freaky part, I got it wrong with the command:

elfdump libm.so.2 | moe

      

In an awesome touch of serendipity, this gave me a usage message for a utility called moe in the description section of the person's page:

The moe utility demonstrates the optimal expansion of a path name containing the linker tokens of the reserved runtime. These markers can be used to define dependencies, filtees, and runpaths on dynamic objects. Extending these tokens at runtime provides a flexible mechanism for selecting objects and search paths that work best on this computer.

This will help me work out why libm.so.2 shlib is incompatible with both two different machines, which is why my incomplete executable cannot run on the same server.

+2


source to share


2 answers


For information display see Solaris elfdump

and pvs

. For debugging binding problems lari

and moe

can also be useful. However, these utilities do not have the ability to modify the library.



+2


source


Starting with Solaris 11 (and some of the OpenSolaris and Solaris Express releases up to Solaris 10 or later), there is now an elfedit tool for modifying execution paths and similar attributes.



+2


source







All Articles