![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| static and shared libraries | JamesByars | UNIX for Advanced & Expert Users | 2 | 01-13-2008 02:29 PM |
| Shared Libraries | wojtyla | Linux | 1 | 09-16-2005 01:14 AM |
| Clarification about shared Libraries | ramkumar_gr | UNIX for Dummies Questions & Answers | 3 | 11-17-2003 07:59 AM |
| shared libraries | thalex | High Level Programming | 2 | 11-29-2001 09:32 AM |
| Shared libraries | Micky | High Level Programming | 0 | 11-12-2001 04:25 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
need help in working with shared libraries on hpux
hi,
i am having problem loading multiple shared libraries. if i load, make call to exposed method and then unload them, everything workds fine, but i have to keep the loaded images in memory, i am uploading the prog. as loader.zip, it contains loader - loader.c which loads c++ shared libraries service1.sl, service2.sl and service3.sl into memory and initilises them support - a c++ archive library which contains the common support needed for all the services, the loader makes call to a exposed method in support.cpp, HookFun namely.. support.h has a macro defines as EXT_INTERFACE which is smart, when a service says EXT_INTERFACE('servicename'), it expands to something like this long interface(){ servicename serviceinstance; servicename.CallService(); } and the HookFun makes and instance of support class which inturn calls interface(), where an instance the required service is created. services/service* - services, shared libraries build using the support archive, and loaded by the loader problem: case 1) when i load service1, make a call to initilize the service and then unload it, load service 2 make a call and then unload it, .... everything is fine. case 2) if i load service1, make a call to initilize the service (dont unload it), load service 2 make a call to initilize it, but this time service 1 is getting initilized again, service 1 is initilized as many services are there.. (my requirement is that i have to keep all the serivces in mermory at the same time) output for first case: The address of the loaded function is 2139010832 the buffer content is service1.sl got addre for proc and it is 2138878086 Dispatch function called with name service1.sl Support initilizing Initilizing class service 1 Service called for service1 The address of the loaded function is 2139010832 the buffer content is service2.sl got addre for proc and it is 2138878070 Dispatch function called with name service2.sl Support initilizing Initilizing class service 2 Service called for service 2 The address of the loaded function is 2139010832 the buffer content is service3.sl got addre for proc and it is 2138878086 Dispatch function called with name service3.sl Support initilizing Initilizing class service 3 Service called for service 3 output for second case: (removed shl_unload) The address of the loaded function is 2139010832 the buffer content is service1.sl got addre for proc and it is 2138878086 Dispatch function called with name service1.sl Support initilizing Initilizing class service 1 Service called for service1 The address of the loaded function is 2139012144 the buffer content is service2.sl got addre for proc and it is 2139003802 Dispatch function called with name service2.sl Support initilizing Initilizing class service 1 Service called for service1 The address of the loaded function is 2139012472 the buffer content is service3.sl got addre for proc and it is 2139004250 Dispatch function called with name service3.sl Support initilizing Initilizing class service 1 Service called for service1 the code i have attached is very simple, please let me know where i am going wrong.. i am executing the program on hpux 10.0 machine and it is patches properly. thankx in advance |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|