This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] define RTLD_LOCAL


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Yaakov (Cygwin/X) wrote, On 8.8.2010 7:49:
> POSIX requires RTLD_LOCAL to be defined in <dlfcn.h>[1].  While our
> dlopen() does nothing with its second argument, portable software can
> rightfully expect the definition to exist alongside the other RTLD_*
> macros.
> 
> So why 0?  POSIX states wrt dlopen()[2]:
> 
>> If neither RTLD_GLOBAL nor RTLD_LOCAL are specified, then the default
>> behavior is unspecified.
> 
> On Linux, RTLD_LOCAL is the default behaviour[3], and hence is defined
> as 0[4], therefore I have done the same here.
> 
> Patch attached.  Since this doesn't actually do anything, I wasn't sure
> if I should bump CYGWIN_VERSION_API_MINOR for this or not; I can
> certainly do so before committing if desired.
Is it not undefined in Cygwin because Windows cannot support the behaviour?
AFAIK once you do LoadLibrary(A.dll) then any subsequent reference to A.dll
and its exports will be satisfied from the already loaded A.dll. IOW, Windows
cannot satisfy "The object's symbols shall not be made available for the
relocation processing of any other object," as specified by [2].

> [1] http://www.opengroup.org/onlinepubs/9699919799/basedefs/dlfcn.h.html
> [2] http://www.opengroup.org/onlinepubs/9699919799/functions/dlopen.html
> [3] http://linux.die.net/man/3/dlopen
> [4] http://sourceware.org/git/?p=glibc.git;a=blob;f=bits/dlfcn.h

- -- 
VH
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iF4EAREIAAYFAkxebDkACgkQeqrf2dJjGj7uMgEAhtmcXzuborabjWbPCGe6VkoL
fo9QyIkvBajGyB9RGp0A/iD+lz/brm33xFvDJ1mZ3SIYorSNGXr3ZXbFPHjTma1Q
=Ap0W
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]