Re: RTLD_LAZY considered harmful (Re: pltlc and pltlcu

David Terrell <dbt@meat.net>

From: David Terrell <dbt@meat.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Date: 2002-02-15T02:08:42Z
Lists: pgsql-hackers
On Mon, Feb 11, 2002 at 07:49:57PM -0500, Tom Lane wrote:
> I also believe that this will produce more consistent cross-platform
> behavior: so far as I could learn from googling, systems that do not
> define RTLD_NOW/RTLD_LAZY all act as though the mode were RTLD_NOW,
> ie, immediate binding.
> 
> Any objections to modifying all the port/dynloader files this way?

OpenBSD:
     The dlopen() function takes a name of a shared object as its first argu-
     ment.  The shared object is mapped into the address space, relocated, and
     its external references are resolved in the same way as is done with the
     implicitly loaded shared libraries at program startup.

     The path argument can either be an absolute pathname or it can be of the
     form ``lib<name>.so[.xx[.yy]]'' in which case the same library search
     rules apply that are used for ``intrinsic'' shared library searches.  The
     second argument currently has no effect, but should be set to DL_LAZY for
     future compatibility.

That last sentence being key....

-- 
David Terrell             | "War is peace, 
Prime Minister, Nebcorp   | freedom is slavery, 
dbt@meat.net              | ignorance is strength 
http://wwn.nebcorp.com/   | Dishes are clean." - Chris Fester