Operating System - Linux
1828774 Members
2933 Online
109985 Solutions
New Discussion

why does dld.sl load libogltls.sl for a simple utility like ls?

 
HTaghavi
Occasional Contributor

why does dld.sl load libogltls.sl for a simple utility like ls?

Using tusc I have noticed every application, and indeed every command leads to libogltls.sl being loaded. Here is a sample:

# /usr/local.orig/bin/tusc env | grep -i .sl
open("/usr/lib/dld.sl", O_RDONLY, 04424) ................. = 3
open("/opt/graphics/OpenGL/lib/libogltls.sl", O_RDONLY, 0) = 3


That doesn't seem right. Isn't libogltls.sl the thread local storage library for OpenGL? ls is not an OpenGL application. Why does libogltls.sl get loaded? It appears this is done by dld.sl as running nm or strings on dld.sl clearly shows a reference to libogltls.sl:

# strings dld.sl | grep OpenGL
/opt/graphics/OpenGL/lib/libogltls.sl

Does dld.sl really need to load libogltls.sl for every command and application? Doesn't this slow things down a bit and create undue dependence? What if OpenGL is not installed?

Thanks.

H Taghavi


3 REPLIES 3
Dennis Handly
Acclaimed Contributor

Re: why does dld.sl load libogltls.sl for a simple utility like ls?

As you guessed, this is for OpenGL. This was the best compromize in setting up TLS for libs that were dynamically loaded, before dynamic TLS was implemented.

It only slows it down for one open that checks when OpenGL isn't installed.

They have removed it in the latest patches for IPF, I'm not sure about PA.
ranganath ramachandra
Esteemed Contributor

Re: why does dld.sl load libogltls.sl for a simple utility like ls?

please set _HP_DLDOPTS to include "-noogltls" in the environment. if you will not be using any opengl programs, you could set it in the users' shell startup scripts.

if you are not using any hpux 9x programs, you can also include "-no_9X_compat" for faster shared library loading (dld wont look for libx.0 when you want to load libx.sl).

_HP_DLDOPT="-noogltls -no_9X_compat"
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo

ranganath ramachandra
Esteemed Contributor

Re: why does dld.sl load libogltls.sl for a simple utility like ls?

please set _HP_DLDOPTS to include "-noogltls" in the environment. if you will not be using any opengl programs, you could set it in the users' shell startup scripts.

if you are not using any hpux 9x programs, you can also include "-no_9X_compat" for faster shared library loading (dld wont look for libx.0 when you want to load libx.sl).

_HP_DLDOPTS="-noogltls -no_9X_compat"
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo