Displaying 20 results from an estimated 44 matches for "rtld_now".
2020 Feb 13
1
[PATCH nbdkit] NOT WORKING vddk: Use dlmopen to isolate VDDK.
..., both can be installed
diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c
index c49eebcd..b988946b 100644
--- a/plugins/vddk/vddk.c
+++ b/plugins/vddk/vddk.c
@@ -267,7 +267,11 @@ load_library (void)
exit (EXIT_FAILURE);
}
+#ifdef HAVE_DLMOPEN
+ dl = dlmopen (LM_ID_NEWLM, path, RTLD_NOW);
+#else
dl = dlopen (path, RTLD_NOW);
+#endif
if (dl != NULL)
break;
if (i == 0) {
--
2.25.0
2020 Feb 13
4
[PATCH nbdkit v2 2/3] NOT WORKING: vddk: Drive library loading from libdir parameter.
I couldn't get this to work in the end. This is the latest
non-working version. This email documents what doesn't work for the
permanent record.
The central problem is that VDDK InitEx() appears to dlopen() various
of its own plugins. Although I wasn't able to capture exactly what
dlopen() command it is running, the plugins cannot be loaded because
they rely on the recompiled
2018 Nov 07
2
Re: guestfs_launch() fails when C application is started as a systemd service
...runs programs.
> Is it using LD_PRELOAD trickery, or replacing libc, or using seccomp?
If I understand the question correctly - it's about how collectd loads its
plugins? If so it uses:
static int plugin_load_file(const char *file, _Bool global) {
void (*reg_handle)(void);
int flags = RTLD_NOW;
if (global)
flags |= RTLD_GLOBAL;
void *dlh = *dlopen*(file, flags);
//...
reg_handle = (void (*)(void))*dlsym*(dlh, "module_register");
//...
*(*reg_handle)();*
}
Does this give any clues?
Best Regards,
Peter
On Wed, Nov 7, 2018 at 12:56 PM Richard W.M. Jones &l...
2003 May 29
2
0.99.10-test8
http://dovecot.procontrol.fi/test/
Again major maildir syncing updates:
- uidlist file is accessed and rewritten a lot less often now than
before
- mail duplicates are detected and handled properly by renaming them to
new base name
- message flag updates and expunging before did two full syncs for cur/
directory. now it does only one.
- some fixes to syncing in read-only / out-of-quota
2020 Feb 13
2
[PATCH nbdkit 1/2] vddk: Delay loading VDDK until config_complete.
...newest library in case multiple exist. */
- "libvixDiskLib.so.6",
- "libvixDiskLib.so.5",
- };
- size_t i;
- CLEANUP_FREE char *orig_error = NULL;
-
- /* Load the library. */
- for (i = 0; i < sizeof sonames / sizeof sonames[0]; ++i) {
- dl = dlopen (sonames[i], RTLD_NOW);
- if (dl != NULL)
- break;
- if (i == 0) {
- orig_error = dlerror ();
- if (orig_error)
- orig_error = strdup (orig_error);
- }
- }
- if (dl == NULL) {
- nbdkit_error ("%s\n\n"
- "If '%s' is located on a non-standard path...
2010 Jan 22
1
[LLVMdev] debugging a pass for LTO
...in gdb, it
>> reports
>>
>> [Thread debugging using libthread_db enabled]
>> Cannot find new threads: generic error
>>
>> at
>>
>> Plugin::load()
>> {
>> #ifdef ENABLE_PLUGINS
>> this->handle_ = dlopen(this->filename_.c_str(), RTLD_NOW);
>>
>> in binutil/src/gold/plugin.cc
>>
>> The gdb version is 7.0.1. I tried it with other multi-threaded
>> programs without any problem. Have I missed something? Or I shouldn't
>> debug my pass this way at all?
>>
>
> Probably the best approach...
2001 Mar 16
3
Patches for NetBSD
...return odelay;
}
$NetBSD: patch-ac,v 1.1.1.1 2001/03/15 20:35:58 wiz Exp $
--- ../libao-0.6.0.orig/src/audio_out.c Fri Feb 23 17:31:46 2001
+++ src/audio_out.c Thu Mar 15 10:21:55 2001
@@ -63,7 +63,7 @@
driver_tree_t *dt;
void *handle;
- handle = dlopen(plugin_file, RTLD_NOW);
+ handle = dlopen(plugin_file, DL_LAZY);
if (handle) {
dt = (driver_tree_t *)malloc(sizeof(driver_tree_t));
if (!dt) return NULL;
$NetBSD: patch-ad,v 1.1 2001/03/16 10:10:35 wiz Exp $
--- src/ao_wav.c.orig Sat Feb 24 02:31:46 2001
+++ src/ao_wav.c
@@ -2...
1998 May 27
3
dependencies in .so files
Thomas Lumley writes:
>
>
> I've been trying to get Matt Calder's S compiler to work in R using R
> COMPILE and R SHLIB so it will be fairly platform-independent.
>
> I'm sure someone has claimed in the past that it is possible/easy to
> dyn.load() two dynamic libraries and have one call functions in the other.
> I can't get it to work (Red Hat
2001 Mar 13
1
Compiling vorbis-tools on NetBSD-1.5/i386
...LOBAL 0
# endif
#endif
/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
find out it does not work in some platform. */
#ifndef LTDL_LAZY_OR_NOW
# ifdef RTLD_LAZY
# define LTDL_LAZY_OR_NOW RTLD_LAZY
# else
# ifdef DL_LAZY
# define LTDL_LAZY_OR_NOW DL_LAZY
# else
# ifdef RTLD_NOW
# define LTDL_LAZY_OR_NOW RTLD_NOW
# else
# ifdef DL_NOW
# define LTDL_LAZY_OR_NOW DL_NOW
# else
# define LTDL_LAZY_OR_NOW 0
# endif
# endif
# endif
# endif
#endif
fnord() { int i=42;}
main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
if(s...
2020 Feb 13
0
[PATCH nbdkit 2/2] vddk: Drive library loading from libdir parameter.
...--git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c
index db61c1d8..c49eebcd 100644
--- a/plugins/vddk/vddk.c
+++ b/plugins/vddk/vddk.c
@@ -256,7 +256,18 @@ load_library (void)
/* Load the library. */
for (i = 0; i < sizeof sonames / sizeof sonames[0]; ++i) {
- dl = dlopen (sonames[i], RTLD_NOW);
+ CLEANUP_FREE char *path;
+
+ /* Set the full path so that dlopen will preferentially load the
+ * system libraries from the same directory.
+ */
+ if (asprintf (&path, "%s/lib%d/%s",
+ libdir ? : VDDK_LIBDIR, 8*SIZEOF_LONG, sonames[i]) == -1) {
+...
2001 Mar 09
6
Problem compiling ogg on OpenBSD-2.7
Hi,
I have downloaded the following files
libao-0.6.0.tar.gz
libogg-1.0beta4.tar.gz
libvorbis-1.0beta4.tar.gz
vorbis-tools-1.0beta4.tar.gz
as said from the download section. But I'm at a loss to what do after
that. I don't have much experience/knowledge in compiling etc, but I
still want to try out ogg. (I downloaded the source coz I have an OpenBSD
machine, and there was no
2020 Feb 17
5
[nbdkit PATCH v5 0/4] vddk: Drive library loading from libdir parameter.
Differences from v4:
Patch 1 is simplified: I realized that since we already use -rdynamic
for nbdkit (after all, we WANT our dlopen()d plugins to be able to
call our nbdkit_* exports), it is only a matter of adding dlopen to
the set of symbols that we export. With that done, there is no
separate shared library needed; our dlopen shim is now part of nbdkit
proper, and we don't have to tweak
2020 Feb 17
0
[nbdkit PATCH v5 4/4] vddk: Drive library loading from libdir parameter.
..."libvixDiskLib.so.6",
+ "lib64/libvixDiskLib.so.5",
"libvixDiskLib.so.5",
};
size_t i;
@@ -256,9 +263,28 @@ load_library (void)
/* Load the library. */
for (i = 0; i < sizeof sonames / sizeof sonames[0]; ++i) {
- dl = dlopen (sonames[i], RTLD_NOW);
- if (dl != NULL)
+ CLEANUP_FREE char *path;
+
+ /* Set the full path so that dlopen will preferentially load the
+ * system libraries from the same directory.
+ */
+ if (asprintf (&path, "%s/%s", libdir, sonames[i]) == -1) {
+ nbdkit_error ("asprintf:...
2020 Feb 16
6
[nbdkit PATCH v4 0/4] vddk: Drive library loading from libdir parameter.
I'm a lot happier with this version: no mucking with dlmopen(). It
does add a bit more coupling between nbdkit proper and the vddk plugin
(namely, nbdkit now exports a new function that the vddk plugin relies
on), but patch 2 adds testsuite coverage of the new function so we
shouldn't regress.
Patch 1 and 2 are new, patch 3 is unchanged from when Rich posted it
in v2, and patch 4 is
2020 Feb 18
0
[nbdkit PATCH v7 2/2] vddk: Drive library loading from libdir parameter.
...quot;lib64/libvixDiskLib.so.5",
+ "lib32/libvixDiskLib.so.5",
"libvixDiskLib.so.5",
};
size_t i;
@@ -348,9 +374,25 @@ load_library (void)
/* Load the library. */
for (i = 0; i < sizeof sonames / sizeof sonames[0]; ++i) {
- dl = dlopen (sonames[i], RTLD_NOW);
- if (dl != NULL)
+ CLEANUP_FREE char *path;
+
+ /* Set the full path so that dlopen will preferentially load the
+ * system libraries from the same directory.
+ */
+ if (asprintf (&path, "%s/%s", libdir, sonames[i]) == -1) {
+ nbdkit_error ("asprintf:...
2010 Jan 22
0
[LLVMdev] debugging a pass for LTO
..., and now I want to debug it using
gdb. I use ld as my target file, but when I run the program in gdb, it
reports
[Thread debugging using libthread_db enabled]
Cannot find new threads: generic error
at
Plugin::load()
{
#ifdef ENABLE_PLUGINS
this->handle_ = dlopen(this->filename_.c_str(), RTLD_NOW);
in binutil/src/gold/plugin.cc
The gdb version is 7.0.1. I tried it with other multi-threaded
programs without any problem. Have I missed something? Or I shouldn't
debug my pass this way at all?
btw, "llvm-gcc -use-gold-plugin" works fine when I compile my program.
Thanks ver...
2018 Nov 07
0
Re: guestfs_launch() fails when C application is started as a systemd service
..._PRELOAD trickery, or replacing libc, or using seccomp?
>
> If I understand the question correctly - it's about how collectd loads its
> plugins? If so it uses:
>
> static int plugin_load_file(const char *file, _Bool global) {
> void (*reg_handle)(void);
> int flags = RTLD_NOW;
> if (global)
> flags |= RTLD_GLOBAL;
> void *dlh = *dlopen*(file, flags);
> //...
> reg_handle = (void (*)(void))*dlsym*(dlh, "module_register");
> //...
> *(*reg_handle)();*
> }
>
>
> Does this give any clues?
Can you strace the c...
2003 Oct 25
0
[LLVMdev] version 1.0, compiling under cygwin
...: `RTLD_DEFAULT' undeclared (first use this
> function)
> DynamicLinker.cpp:40: error: (Each undeclared identifier is reported only once
> for each function it appears in.)
> -----------------
>
> well, the only value supported in cygwin's dlfcn.h are RTLD_LAZY,
> RTLD_NOW and RTLD_GLOBAL.
Does the cygwin version of dlopen return the main process if 0 is passed
in as the first parameter? The wording in the linux man page looks like
this:
If filename is a NULL pointer, then the returned handle is for the
main program.
If so, this patch should fix the...
2003 Oct 25
3
[LLVMdev] version 1.0, compiling under cygwin
...;:
DynamicLinker.cpp:40: error: `RTLD_DEFAULT' undeclared (first use this
function)
DynamicLinker.cpp:40: error: (Each undeclared identifier is reported only once
for each function it appears in.)
-----------------
well, the only value supported in cygwin's dlfcn.h are RTLD_LAZY,
RTLD_NOW and RTLD_GLOBAL.
So, just for checking compilation I've changed the line
return dlsym (RTLD_DEFAULT, symbolName);
in DynamicLinker.cpp to the following:
return dlsym (/*RTLD_DEFAULT*/(void*)RTLD_LAZY, symbolName);
than compilation itself finished, just linkage failed with one screen
ou...
2006 Sep 07
2
Plugins for Dovecot at FreeBSD 6.0
Hi
I met problem developing plug-in under FreeBSD 6.1.
First I tried to use internal plugins like quota and acl but I got:
IMAP(xxx): module /usr/local/lib/dovecot/imap/lib01_acl_plugin.so:
dlsym(acl_plugin_init) failed: Shared object "nss_dns.so.1" not found,
required by "imap"
This library doesn't exist on FreeBSD 6.1 Same story when u mention any
plugin in