[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: commit: ldap/libraries/libldap_r rmutex.c threads.c

Hallvard B Furuseth wrote:
hyc@OpenLDAP.org writes:
	threads.c  1.19 -> 1.20
rmutex_lock etc.: caller supplies thread id

Why is the "kludge to pull symbol definitions in" necessary -
and if it's necessary there, why doesn't the library need to be
full of similar kludges for other symbol definitions?

This is just a quickie to get the functionality working. The kludge is needed when libldap_r is statically linked to slapd and the symbols are needed by a dynamically loaded module (e.g. the accesslog overlay). Currently most other symbols don't need similar kludges because most of those symbols are invoked by slapd already, so they are always present in the slapd binary. Normally invoking libtool with -export-dynamic/-dlopen-self is supposed to take care of this automatically (scan the dynamic modules and generate an export table to satisfy their references), but I think that feature of libtool has been broken for quite a while and it takes far too much time to repair libtool.

The problem was that these functions are used nowhere else in slapd (since they're totally new), so they were not available to the dynamically loaded accesslog overlay, so they were unresolved references when the module was loaded.

 -- Howard Chu
 Chief Architect, Symas Corp.  http://www.symas.com
 Director, Highland Sun        http://highlandsun.com/hyc
 OpenLDAP Core Team            http://www.openldap.org/project/