Operating System - HP-UX
1844070 Members
3226 Online
110227 Solutions
New Discussion

making shared library to be shared

 
SOLVED
Go to solution
上田 弘信
Advisor

making shared library to be shared

Hello,
I have an application which uses quite large number of hand-made shared libraries.

When I run several processes of the application I found, through the glance tool, each processes map shared libraries onto their private memory area. (glance->Process Memory Region->"MEMMAP/Priv")

How can I make shared libraries loaded onto shared area?

I would appreciate any advice. Thanks in advance.

----------------------------------------------
- I don't load libraries calling system calls explicitly, I just compile the executable with make option -L/lib_dir -lname.

-env info:
HP-UX 11.00
aCC 3.31

-Someone told me about a command called 'pxdb', might be doing something, but I could not tell how to de-pxdb since 'man pxdb' gives me no result...

-An advice about where (which document) to look into would be also great.

Sato@JFITS
takeshi
2 REPLIES 2
Mike Stroyan
Honored Contributor
Solution

Re: making shared library to be shared

Each shared library consists of as many as three regions. There is a region for text, a region for initialized data, and a region for uninitialized data (or BSS). Only the text region can be mapped as shared. The data regions must be private to each process. You are probably seeing data regions in the glance output. The text area can be mapped private to allow a debugger to set breakpoints. That will happen when a process is started by a debugger or by using the "pxdb -s on" or newer "chatr +debug enable" settings. You can turn that off with "pxdb -s off" or "chatr +debug disable". The chatr feature is only present in chatr from fairly recent "linker and loader" patches.
上田 弘信
Advisor

Re: making shared library to be shared

Thank you, Mike.
By doint 'pxdb -s disable' I could load shared libraries onto shared area.
Sorted!

Sato
takeshi