search for: rtld_global

Displaying 20 results from an estimated 48 matches for "rtld_global".

2007 Apr 09
1
RTLD_GLOBAL flag for dlopen
I am just experimenting with a plugin loader and I found that there are problems with external symbols which are loaded at runtime. The solution is to add RTLD_GLOBAL to the dlopen mode, but I am not sure if this would cause other problems. Is this patch OK to go in? -------------- next part -------------- A non-text attachment was scrubbed... Name: rtld_global.diff Type: text/x-patch Size: 357 bytes Desc: not available Url : http://lists.freedesktop.org/arch...
2013 Mar 20
4
[LLVMdev] Hidden-visibility aliases to default-visibility globals
Hi, I am trying to compile a dynamic loader using LLVM. Part of the IR for this loader looks like this: @_rtld_local = hidden alias %struct.rtld_global* @_rtld_global @_rtld_global = unnamed_addr global %struct.rtld_global { ... } The purpose of _rtld_local is to allow _rtld_global to be referenced without using the GOT, as this global is accessed before the dynamic loader initialises the GOT. However, LLVM sees through the alias and resolves re...
2018 Aug 20
0
Consider setting RTLD_GLOBAL when loading packages in LinkingTo
...ks perfectly, because type1 is exactly the same in pkg1.so and pkg2.so. *But* UBSAN sanitizers give a runtime error, which arguably is a false positive. Real example on CRAN: https://www.stats.ox.ac.uk/pub/bdr/memtests/gcc-UBSAN/ldat/ldat-Ex.Rout A solution to this would be to dlopen pkg1.so with RTLD_GLOBAL, instead of RTLD_LOCAL, i.e., dyn.load(local=FALSE). So my proposal is to automatically set RTLD_GLOBAL for those packages that are listed at the same time in Depends/Imports/Suggests and LinkingTo, at least for those machines on CRAN running UBSAN tests. Regards, -- I?aki Ucar
2008 Jul 09
2
[LLVMdev] Add RTLD_GLOBAL to dlopen
...anently(...) implementation in $LLVM/ lib/System/DynamicLibrary.cpp has been altered for LLVM 2.3. The rewrite does not make loaded symbols available for future loaded libraries. Changing on line 64: void *H = dlopen(Filename, RTLD_LAZY); ... into ... void *H = dlopen(Filename, RTLD_LAZY | RTLD_GLOBAL); fixes this. Could this change be incorporated into future releases? Thanks in advance! Kind regards, Bram Adams GH-SEL, INTEC, Ghent University (Belgium)
2019 Dec 13
0
dlopen RTD_LAZY and RTLD_GLOBAL
All, I use a code which has a python (I use python36) wrapper loading shared libraries. The code worked fine in RHEL 7 but as I was testing it on Centos 8, python cannot import the shared library (the import is done via dlopen with flags set as > sys.setdlopenflags(os.RTLD_LAZY | os.RTLD_GLOBAL) python then does a bunch of imports and most results in a shared library with indefined symbols. Somthing like: > from .w3dpy import * > ImportError: > /usr/local/lib64/python3.6/site-packages/warp/w3dpy.cpython-36m-x86_64-linux-gnu.so: undefined symbol: multigridxyf2_ The...
2008 Jul 10
0
[LLVMdev] Add RTLD_GLOBAL to dlopen
.../System/DynamicLibrary.cpp has been altered for LLVM 2.3. The > rewrite does not make loaded symbols available for future loaded > libraries. > > Changing on line 64: > > void *H = dlopen(Filename, RTLD_LAZY); > > ... into ... > > void *H = dlopen(Filename, RTLD_LAZY | RTLD_GLOBAL); > > fixes this. Could this change be incorporated into future releases? > Thanks in advance! > > Kind regards, > > Bram Adams > GH-SEL, INTEC, Ghent University (Belgium) > _______________________________________________ > LLVM Developers mailing list > LLVMdev at...
1998 May 27
3
dependencies in .so files
...n't get it to work (Red Hat 5.0/R0.61.1ish). It doesn't seem to matter > what order I load them in, they can't find each other. > > Any ideas? >From the dlopen man page: void *dlopen (const char *filename, int flag); ................................................ RTLD_GLOBAL may be or'ed with flag in which case the external symbols defined in the library will be made available to subsequently loaded libraries. So, I try: 1) I modify src/unix/dynload.c changing the flag of dlopen from RTLD_LAZY to (RTLD_LAZY | RTLD_GLOBAL) 2) build two simple shared libr...
2013 Mar 21
0
[LLVMdev] Hidden-visibility aliases to default-visibility globals
On Wed, Mar 20, 2013 at 02:22:47PM -0700, Peter Collingbourne wrote: > I am trying to compile a dynamic loader using LLVM. Part of the IR > for this loader looks like this: > > @_rtld_local = hidden alias %struct.rtld_global* @_rtld_global > @_rtld_global = unnamed_addr global %struct.rtld_global { ... } Have you tried using protected visibility? Joerg
2013 Apr 01
2
[LLVMdev] Hidden-visibility aliases to default-visibility globals
...at 02:12:27PM +0900, Joerg Sonnenberger wrote: > On Wed, Mar 20, 2013 at 02:22:47PM -0700, Peter Collingbourne wrote: > > I am trying to compile a dynamic loader using LLVM. Part of the IR > > for this loader looks like this: > > > > @_rtld_local = hidden alias %struct.rtld_global* @_rtld_global > > @_rtld_global = unnamed_addr global %struct.rtld_global { ... } > > Have you tried using protected visibility? Oops, missed this message. I think there was some reason why I thought protected visibility would not work, but I just tried it and it turns out that it d...
2012 Oct 22
5
[LLVMdev] dyld: lazy symbol binding failed: fast lazy bind offset out of range
...... > > (gdb) > llvm::sys::DynamicLibrary::getPermanentLibrary (filename=0x142903da8 "/sw/opt/llvm-3.2/lib/LLVMPolly.so", errMsg=0x7fff5fbfe6e0) at /sw/src/fink.build/llvm32-3.2-0/llvm-3.2/lib/Support/DynamicLibrary.cpp:77 > 77 void *handle = dlopen(filename, RTLD_LAZY|RTLD_GLOBAL); > (gdb) > Reading symbols for shared libraries ... done > dyld: calling initializer function 0x100eea5b0 in /sw/opt/llvm-3.2/lib/LLVMPolly.so You need to set a break point at 0x100eea5b0 and run again until that break is hit, then start stepping. > Are there any tricks for identifyi...
2012 Oct 23
1
[LLVMdev] dyld: lazy symbol binding failed: fast lazy bind offset out of range
...> (gdb) > > llvm::sys::DynamicLibrary::getPermanentLibrary (filename=0x142903da8 "/sw/opt/llvm-3.2/lib/LLVMPolly.so", errMsg=0x7fff5fbfe6e0) at /sw/src/fink.build/llvm32-3.2-0/llvm-3.2/lib/Support/DynamicLibrary.cpp:77 > > 77 void *handle = dlopen(filename, RTLD_LAZY|RTLD_GLOBAL); > > (gdb) > > Reading symbols for shared libraries ... done > > dyld: calling initializer function 0x100eea5b0 in /sw/opt/llvm-3.2/lib/LLVMPolly.so > > You need to set a break point at 0x100eea5b0 and run again until that break is hit, then start stepping. > > >...
2018 Nov 07
2
Re: guestfs_launch() fails when C application is started as a systemd service
...AD 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 <rjones@redhat.com> wrote: > On Wed,...
2012 Oct 23
0
[LLVMdev] dyld: lazy symbol binding failed: fast lazy bind offset out of range
...gdb) >>> llvm::sys::DynamicLibrary::getPermanentLibrary (filename=0x142903da8 "/sw/opt/llvm-3.2/lib/LLVMPolly.so", errMsg=0x7fff5fbfe6e0) at /sw/src/fink.build/llvm32-3.2-0/llvm-3.2/lib/Support/DynamicLibrary.cpp:77 >>> 77 void *handle = dlopen(filename, RTLD_LAZY|RTLD_GLOBAL); >>> (gdb) >>> Reading symbols for shared libraries ... done >>> dyld: calling initializer function 0x100eea5b0 in /sw/opt/llvm-3.2/lib/LLVMPolly.so >> >> You need to set a break point at 0x100eea5b0 and run again until that break is hit, then start stepping...
2013 Oct 06
1
[LLVMdev] how to runtime link to shared library symbols in the JIT?
I would like to load shared libraries at runtime for use in some JIT'd code. I can't find much about how the JIT resolves symbols, so can somebody answer a few questions for me? 1. Will the symbols from a dlopen'd library with RTLD_GLOBAL be available? In this case I can manually dlopen the libraries prior to the JIT run. 2. Can I derive from ExecutionEngine and override the getPointerToNamedFunction method? If so, does this just return the C/ABI pointer to the function? What is the equivalent for data variables? 3. Is the same ba...
2013 May 14
0
[LLVMdev] Hidden-visibility aliases to default-visibility globals
...rg Sonnenberger wrote: > > On Wed, Mar 20, 2013 at 02:22:47PM -0700, Peter Collingbourne wrote: > > > I am trying to compile a dynamic loader using LLVM. Part of the IR > > > for this loader looks like this: > > > > > > @_rtld_local = hidden alias %struct.rtld_global* @_rtld_global > > > @_rtld_global = unnamed_addr global %struct.rtld_global { ... } > > > > Have you tried using protected visibility? > > Oops, missed this message. I think there was some reason why I thought > protected visibility would not work, but I just tried...
2011 Mar 07
1
Rmpi fails to install
I try to install Rmpi as root with install.packages("Rmpi"). It fails with: ... checking for x86_64-pc-linux-gnu-gcc -std=gnu99 option to accept ISO C89... none needed I am here /usr and it is OpenMPI Trying to find mpi.h ... Found in /usr/include Trying to find libmpi.so or libmpich.a ... Found libmpi in /usr/lib checking for openpty in -lutil... yes checking for main in -lpthread...
2012 Oct 22
0
[LLVMdev] dyld: lazy symbol binding failed: fast lazy bind offset out of range
...r occurs right after... (gdb) llvm::sys::DynamicLibrary::getPermanentLibrary (filename=0x142903da8 "/sw/opt/llvm-3.2/lib/LLVMPolly.so", errMsg=0x7fff5fbfe6e0) at /sw/src/fink.build/llvm32-3.2-0/llvm-3.2/lib/Support/DynamicLibrary.cpp:77 77 void *handle = dlopen(filename, RTLD_LAZY|RTLD_GLOBAL); (gdb) Reading symbols for shared libraries ... done dyld: calling initializer function 0x100eea5b0 in /sw/opt/llvm-3.2/lib/LLVMPolly.so dyld: lazy symbol binding failed: fast lazy bind offset out of range (53437, max=7640) in image /sw/lib/gcc4.7/libexec/gcc/x86_64-apple-darwin12.2.0/4.7.2/cc1 dy...
2001 Mar 13
1
Compiling vorbis-tools on NetBSD-1.5/i386
...tself ltconfig:2653: gcc -o conftest -g -O2 -fno-builtin -fno-rtti -fno-exceptions -DHAVE_DLFCN_H -Wl,--export-dynamic -static conftest.c 1>&5 ltconfig: failed program was: #line 2607 "ltconfig" #if HAVE_DLFCN_H #include <dlfcn.h> #endif #include <stdio.h> #ifdef RTLD_GLOBAL # define LTDL_GLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LTDL_GLOBAL DL_GLOBAL # else # define LTDL_GLOBAL 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 #...
2012 Oct 22
0
[LLVMdev] dyld: lazy symbol binding failed: fast lazy bind offset out of range
...e log is as follows... (gdb) llvm::sys::DynamicLibrary::getPermanentLibrary (filename=0x144002188 "/sw/opt/llvm-3.2/lib/LLVMPolly.so", errMsg=0x7fff5fbfe700) at /sw/src/fink.build/llvm32-3.2-0/llvm-3.2/lib/Support/DynamicLibrary.cpp:77 77 void *handle = dlopen(filename, RTLD_LAZY|RTLD_GLOBAL); (gdb) Reading symbols for shared libraries ... done dyld: lazy symbol binding failed: fast lazy bind offset out of range (53437, max=7640) in image /sw/lib/gcc4.7/libexec/gcc/x86_64-apple-darwin12.2.0/4.7.2/cc1 dyld: fast lazy bind offset out of range (53437, max=7640) in image /sw/lib/gcc4.7/li...
2018 Nov 07
0
Re: guestfs_launch() fails when C application is started as a systemd service
...omp? > > 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 collectd process around the point where qemu-img is run...