[vlc-devel] [patch] Alter symbol-globalising dlopen(RTLD_NOLOAD) call to succeed

Robert Ziegler rziegler42 at yahoo.com
Thu Feb 12 14:11:52 CET 2009

>On Thu, 12 Feb 2009 13:09:03 +0100 (CET), jpd at m2x.nl wrote:
>> On Thu, February 12, 2009 10:31 am, R\xc3\x83\xc2\xa9mi Denis-Courmont
>> wrote:
>>> On Wed, 11 Feb 2009 22:07:06 +0100 (CET), jpd at m2x.nl wrote:
>>>> Always run dlopen(vlccore,RTLD_NOLOAD) when available and add RTLD_NOW
>>>> to prevent the call from failing with an invalid argument error.
>>> This patch is wrong. We don't want to load libvlccore
>>> unconditionnally. Otherwise, we would link plugins against it in the
>>> first place, and get rid of this hack altogether.
>> As you'll note, RTLD_NOLOAD is still set.
>So what? That's not the point.

>From the linux man page for dlopen():

One of the following two values must be included in flag:RTLD_LAZY or RTLD_NOW
Zero of more of the following values may also be ORed in flag:RTLD_GLOBAL, RTLD_LOCAL, RTLD_NODELETE, RTLD_NOLOAD, RTLD_DEEPBIND

My understanding (which may be incorrect), with linux, if one of RDLD_LAZY or RTLD_NOW is not included in the flags, the dlopen() call fails and returns with NULL.


More information about the vlc-devel mailing list