Re: RTLD_LAZY considered harmful (Re: pltlc and pltlcu

From: "Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: RTLD_LAZY considered harmful (Re: pltlc and pltlcu
Date: 2002-02-12 11:00:44
Message-ID: 46C15C39FEB2C44BA555E356FBCD6FA41EB4E6@m0114.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> I hate to sound like a broken record, but I want to re-open that
> discussion about RTLD_LAZY binding that trailed off a week or two
> ago. I have just noticed that the 7.0 and 7.1 versions of
> src/backend/port/dynloader/linux.h have
>
> #define pg_dlopen(f) dlopen(f, 2)
>
> which in 7.2 has been changed to
>
> #define pg_dlopen(f) dlopen((f), RTLD_LAZY | RTLD_GLOBAL)

One thing to really watch out for is that old style extensions,
that only need a few functions from a standard library will load
more efficiently with RTLD_LAZY. (might not even pull in dependent
libs, that are not needed)

Next thing to watch out for is, that RTLD_NOW will probably not load
a shared lib, that was not linked with a "no entry" flag. Arguably a bug
for a shared lib, but a recent report has shown that pg fails to supply
such a flag on all ports.

I am for keeping RTLD_LAZY :-)

Andreas

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Kalchev 2002-02-12 12:36:11 again on index usage (7.1.3)
Previous Message Martijn van Oosterhout 2002-02-12 10:54:59 Re: [HACKERS] Feature enhancement request : use of libgda in