[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -dlopen self on AIX

From: Howard Chu
Subject: Re: -dlopen self on AIX
Date: Sun, 30 Oct 2005 11:45:05 -0800
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20051027 SeaMonkey/1.1a

Bob Friesenhahn wrote:
On Sun, 30 Oct 2005, Albert Chin wrote:

Seems the openldap folks should really use -export-dynamic, which
isn't defined for AIX. We could make it -bexpall but as documented in
the previous mail, it doesn't export everything. So, should we create
a new variable, export_dynamic_cmds? If so, and temporary files are
created by it, how do we clean up?

A better approach for openldap is to have the daemon and its modules depend on a common shared library. As far as I am aware, this works ok under AIX and other systems. Designing modules so that they depend on symbols from the executable which loads them is just asking for trouble.

We've talked about taking this approach before. Essentially all of the slapd code would become a shared library, and the main program would just be a stub that loads it. (This became an issue back in release 2.1, when the slap tools were still separate executables. Since shared modules record the name of the file that exports their symbols, a shared module linked against slapd would not work when loaded by slapadd. And this was before the AIX linker supported importing files against "." and "..". The solution at that time was to merge all of the slap tools into the main slapd executable, which we did in release 2.2. The same issue bit us on Windows, and the same fix worked there too.) Unfortunately the shared library-slapd approach is unmanageable because the code uses on a number of static libraries that are not usually compiled as PIC code. It would be a pretty drastic change to get that all working.

  -- Howard Chu
  Chief Architect, Symas Corp.
  Director, Highland Sun
  OpenLDAP Core Team  

reply via email to

[Prev in Thread] Current Thread [Next in Thread]