RTLD_GLOBAL on openbsd

Started by Alex Pilosovover 24 years ago5 messages
#1Alex Pilosov
alex@pilosoft.com

OpenBSD lacks RTLD_GLOBAL, so it should be removed from
dynloader/openbsd.h

(netbsd and freebsd do have it, so its kosher there)

-alex

#2bpalmer
bpalmer@crimelabs.net
In reply to: Alex Pilosov (#1)
1 attachment(s)
Re: RTLD_GLOBAL on openbsd

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

OpenBSD lacks RTLD_GLOBAL, so it should be removed from
dynloader/openbsd.h

I agree with this and my regression tests now pass. Can someone please
apply the attached patch?

- - Brandon

- ----------------------------------------------------------------------------
b. palmer, bpalmer@crimelabs.net pgp:crimelabs.net/bpalmer.pgp5

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
Charset: noconv

iQA/AwUBOyuO0PYgmKoG+YbuEQK+agCfde8j3y0KxbwhUqIyVNpEjEqCp74AoPyt
b7+D94bTAw/yXYIValtBNB7d
=eisL
-----END PGP SIGNATURE-----

Attachments:

mrdifftext/plain; charset=US-ASCII; name=mrdiffDownload
? mrdiff
? contrib/spi/refint.so.pic
? contrib/spi/autoinc.so.pic
? src/test/regress/regress.so.pic
Index: src/backend/port/dynloader/openbsd.h
===================================================================
RCS file: /mnt/cvs/pgsql/src/backend/port/dynloader/openbsd.h,v
retrieving revision 1.5
diff -u -r1.5 openbsd.h
--- src/backend/port/dynloader/openbsd.h	2001/05/15 16:55:27	1.5
+++ src/backend/port/dynloader/openbsd.h	2001/06/16 16:43:21
@@ -34,7 +34,7 @@
  * begin with an underscore is fairly tricky, and some versions of
  * NetBSD (like 1.0, and 1.0A pre June 1995) have no dlerror.)
  */
-#define		   pg_dlopen(f)    BSD44_derived_dlopen((f), RTLD_LAZY | RTLD_GLOBAL)
+#define		   pg_dlopen(f)    BSD44_derived_dlopen((f), RTLD_LAZY)
 #define		   pg_dlsym		   BSD44_derived_dlsym
 #define		   pg_dlclose	   BSD44_derived_dlclose
 #define		   pg_dlerror	   BSD44_derived_dlerror
#3Peter Eisentraut
peter_e@gmx.net
In reply to: Alex Pilosov (#1)
Re: RTLD_GLOBAL on openbsd

Alex Pilosov writes:

OpenBSD lacks RTLD_GLOBAL, so it should be removed from
dynloader/openbsd.h

Okay.

Btw., couldn't we replace dynloader/openbsd.h with something more like,
say, dynloader/sunos4.h and get rid of the BSD44_derived_dl*() functions?
AFAICT, the issue was that on earlier (Net|Free)BSD systems you needed to
prepend an '_' to the looked-up symbol, but I could not find any reference
to this in the OpenBSD documentation.

--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter

#4Alex Pilosov
alex@pilosoft.com
In reply to: Peter Eisentraut (#3)
Re: RTLD_GLOBAL on openbsd

On Sat, 16 Jun 2001, Peter Eisentraut wrote:

Alex Pilosov writes:

OpenBSD lacks RTLD_GLOBAL, so it should be removed from
dynloader/openbsd.h

Okay.

Btw., couldn't we replace dynloader/openbsd.h with something more like,
say, dynloader/sunos4.h and get rid of the BSD44_derived_dl*() functions?
AFAICT, the issue was that on earlier (Net|Free)BSD systems you needed to
prepend an '_' to the looked-up symbol, but I could not find any reference
to this in the OpenBSD documentation.

On OpenBSD, you still need to do that. I haven't checked Free yet, but I
think that's still true also.
-alex

#5Peter Eisentraut
peter_e@gmx.net
In reply to: Alex Pilosov (#1)
Re: RTLD_GLOBAL on openbsd

Alex Pilosov writes:

OpenBSD lacks RTLD_GLOBAL, so it should be removed from
dynloader/openbsd.h

RTLD_GLOBAL removed. You better hope it acts like it by default, though.

--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter