Closed athas closed 3 years ago
Thanks!
My /usr/include/x86_64-linux-gnu/bits/dlfcn.h
contains the following, so RTLD_NOW || RTLD_LOCAL == 1 == RTLD_LAZY | RTLD_LOCAL
(probably). I guess we were resolving symbols lazily by accident.
/* The MODE argument to `dlopen' contains one of the following: */
#define RTLD_LAZY 0x00001 /* Lazy function call binding. */
#define RTLD_NOW 0x00002 /* Immediate function call binding. */
#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */
#define RTLD_NOLOAD 0x00004 /* Do not load the object. */
#define RTLD_DEEPBIND 0x00008 /* Use deep binding. */
/* If the following bit is set in the MODE argument to `dlopen',
the symbols of the loaded object and its dependencies are made
visible as if the object were linked directly into the program. */
#define RTLD_GLOBAL 0x00100
/* Unix98 demands the following flag which is the inverse to RTLD_GLOBAL.
The implementation does this by default and so we can define the
value to zero. */
#define RTLD_LOCAL 0
@awf or @dcrc2, probably worth having one of you double check this.
Rebased on top of master to avoid conflicts.
Thanks @athas! @toelli-msft can we merge this?
Yes, we can merge. It had a test failure that I think may have been transient. I've kicked off another run.
Remarkably it still worked before, but who knows what it did (and the compiler complained).