search for: rtld_next

Displaying 20 results from an estimated 23 matches for "rtld_next".

2005 Sep 27
2
[LLVMdev] SysUtils.c compile problem on Mac OSX 10.3 with llvm-1.4
I am currently running on a Mac OSX 10.3.8 and trying to compile llvm-1.4 on my local machine for Prof. Adve's class. I am using Apple's provided gcc 3.3 as my compiler. I ran into this compile error: SysUtils.c: In function `executeProgram': SysUtils.c:119: error: `RTLD_NEXT' undeclared (first use in this function) SysUtils.c:119: error: (Each undeclared identifier is reported only once SysUtils.c:119: error: for each function it appears in.) make[2]: *** [/Users/senatorned/llvm/tools/llee/Debug/SysUtils.lo] Error 1 make[1]: *** [llee/.makeall] Error 2 make: *** [a...
2004 Feb 21
0
Solaris interposer code for nsswitch.conf
...n earnest - they are just there for debugging. */ #include <stdio.h> #include <strings.h> #include <dlfcn.h> FILE* fopen(const char *fpath, const char *mode ){ static FILE * (*func)(const char*, const char *); if(!func) func = ( FILE * (*)(const char*, const char *))dlsym(RTLD_NEXT, "fopen"); if(strcmp(fpath,"/etc/nsswitch.conf")==0) fpath = "/etc/nsswitch_samba.conf"; printf(" calling fopen(%s, %s)\n", fpath, mode); return(func(fpath, mode)); } FILE* fopen64(const char *fpath, const char *mode ){ static FILE * (*func)(con...
2005 Sep 27
0
[LLVMdev] SysUtils.c compile problem on Mac OSX 10.3 with llvm-1.4
...running on a Mac OSX 10.3.8 and trying to > compile llvm-1.4 on my local machine for Prof. Adve's class. > > I am using Apple's provided gcc 3.3 as my compiler. > > I ran into this compile error: > SysUtils.c: In function `executeProgram': > SysUtils.c:119: error: `RTLD_NEXT' undeclared (first use in > this function) > SysUtils.c:119: error: (Each undeclared identifier is reported > only once > SysUtils.c:119: error: for each function it appears in.) > make[2]: *** > [/Users/senatorned/llvm/tools/llee/Debug/SysUtils.lo] Error 1 > make[1]: *** [...
2004 Dec 10
1
[LLVMdev] Building llvm and cfrontend under cygwin
...ose to do so. Alright, I've got llvm and llvm-gcc from RELEASE_14 cvs and tried building it under cygwin. 1) The first problem is with llvm in SysUtils.c: int executeProgram(const char *filename, char *const argv[], char *const envp[]) { ................ execveTy execvePtr = (execveTy) dlsym(RTLD_NEXT, "execve"); ..... } RTLD_NEXT is not defined in cygwin headers. 2) cfontend built ok 3) full llvm failed to build: make[3]: Entering directory `/cygdrive/d/3rd-party/llvm/runtime/GCCLibraries/crtend' llvm[3]: Compiling Exception.cpp for Debug build (bytecode) llvm[3]: Linking comp...
1996 Feb 14
0
JDK 1.0 port to FreeBSD
...run it, use 'java <name of main class>'. Status ------ This port is kind of flacky and I hesitate to release it, but it does meet my long-stated criteria of being self-hosting. The problems are related to the kludgy work-around I used to get around not having weak symbols and dlsym(RTLD_NEXT). The pthreads port does not have this problem, so the next release may use that instead, but I'm leaning towards fixing up the underlying operating system rather than working around it. The next release will come when I get appletviewer to work. How you can help ---------------- We could us...
2020 Feb 14
3
alternatives for hooking dlopen() without LD_LIBRARY_PATH or LD_AUDIT?
I've got a situation where I need to hook a dlopen() made by VDDK, a proprietary library, where it passes a relative name expecting to resolve to a copy of several libraries, including libstdc++.so, that it installs alongside itself, and fails to load if that resolves to the system libstdc++.so. The simplest solution of providing LD_LIBRARY_PATH is enough to load VDDK, but then poisons
2020 Feb 14
0
Re: alternatives for hooking dlopen() without LD_LIBRARY_PATH or LD_AUDIT?
...ke too soon. I've tried another approach that looks like it will do what I want: put my shim dlopen() in a shared library, but link nbdkit against that shared library PRIOR to -ldl (so that name lookup for dlopen resolves there first). The shim library in turn depends on -ldl so that dlsym(RTLD_NEXT, "dlopen") still lets me get to the real dlopen. And by linking it directly into nbdkit, rather than into the nbdkit-vddk-plugin.so that gets loaded later, the first bound dlopen() in use for all subsequent loads is from my shim. It's still a bit less clean than I'd like (it...
2006 Jan 24
4
sftp performance problem, cured by TCP_NODELAY
...elay.c */ #define _GNU_SOURCE #include <dlfcn.h> #include <sys/socket.h> #include <netinet/in.h> #include <netinet/tcp.h> int connect(int sock, const struct sockaddr *addr, socklen_t addrlen) { int (*next_connect)(int, const struct sockaddr *, socklen_t) = dlsym(RTLD_NEXT, "connect"); int res = next_connect(sock, addr, addrlen); if (addr->sa_family == AF_INET) { int opt = 1; setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &opt, sizeof(opt)); } return res; } ------------------------------------------------------------------...
2009 May 29
4
can Dtrace be used for the error injection?
Hi, is it somehow possible to use Dtrace for error injection in a kernel module? Something like changing: - function return value - value of a register If not, can it be implemented? I can do that via kmdb, but I need Dtrace for the time synchronization - chill() action. I can not combine Dtrace & kmdb: dtrace: failed to initialize dtrace: DTrace cannot be used when kernel debugger
2002 Jun 26
22
FW: samba woes
All, I have been working on a component that is included with samba called SMBSH. The binary allows you to automount your NT shares by accessing your profile . I have been working on this for the last few days and have been unsuccesful at getting it work. Now I am not much of a programmer, but I did my best to try and troubleshoot this. However it just does not want to work in Linux. I
2020 Feb 17
2
Re: alternatives for hooking dlopen() without LD_LIBRARY_PATH or LD_AUDIT?
...e tried another approach that looks like it > will do what I want: put my shim dlopen() in a shared library, but link > nbdkit against that shared library PRIOR to -ldl (so that name lookup > for dlopen resolves there first).  The shim library in turn depends on > -ldl so that dlsym(RTLD_NEXT, "dlopen") still lets me get to the real > dlopen.  And by linking it directly into nbdkit, rather than into the > nbdkit-vddk-plugin.so that gets loaded later, the first bound dlopen() > in use for all subsequent loads is from my shim.  It's still a bit less > clean t...
2015 Feb 24
4
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
..._bo_prime_handle_ref(nvdev, import_fd, &bo)) + nouveau_bo_ref(NULL, &bo); + } + return NULL; +} + +int main(int argc, char *argv[]) +{ + drmVersionPtr version; + const char *device; + int err, fd, fd2; + struct nouveau_device *nvdev, *nvdev2; + struct nouveau_bo *bo; + + old_ioctl = dlsym(RTLD_NEXT, "ioctl"); + + pthread_t t1, t2; + + if (argc < 2) + device = default_device; + else + device = argv[1]; + + fd = open(device, O_RDWR); + fd2 = open(device, O_RDWR); + if (fd < 0 || fd2 < 0) + return 1; + + version = drmGetVersion(fd); + if (version) { + printf("Version:...
2020 Feb 16
0
[nbdkit PATCH v4 1/4] server: Export nbdkit_set_dlopen_prefix function
...lse + nbdkit_debug ("dlopen: failed to allocate replacement for %s", filename); + } + + ret = orig_dlopen (filename, flags); + free (tmp); + return ret; +} + +static void constructor (void) __attribute__ ((constructor)); +static void +constructor (void) +{ + orig_dlopen = dlsym (RTLD_NEXT, "dlopen"); +} diff --git a/tests/test-nbdkit-backend-debug.sh b/tests/test-nbdkit-backend-debug.sh index 3a28b756..8fe78b48 100755 --- a/tests/test-nbdkit-backend-debug.sh +++ b/tests/test-nbdkit-backend-debug.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # nbdkit -# Copyright (C) 2019 Red Ha...
2016 Jul 13
2
[LLVM/Clang v3.8.1] Missing Git branches/tags and source-tarballs?
On Wed, Jul 13, 2016 at 04:48:51PM +0200, Sedat Dilek via llvm-dev wrote: > [ CCed all people who were involved in this thread ] > > Hi Tom, > > personally, I am interested to test the prebuilt-toolchains for > Ubuntu/xenial alias 16.04 LTS and Debian/Jessie v8.5.0 AMD64. > The available toolchains are incomplete and thus useless. > > Just as a fact: There is still no
2015 Feb 25
0
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...eturn NULL; > +} > + > +int main(int argc, char *argv[]) > +{ > + drmVersionPtr version; > + const char *device; > + int err, fd, fd2; > + struct nouveau_device *nvdev, *nvdev2; > + struct nouveau_bo *bo; > + > + old_ioctl = dlsym(RTLD_NEXT, "ioctl"); > + > + pthread_t t1, t2; > + > + if (argc < 2) > + device = default_device; > + else > + device = argv[1]; > + > + fd = open(device, O_RDWR); > + fd2 = open(device, O_RDWR); > +...
2015 Feb 25
1
[PATCH 1/2] nouveau: make nouveau importing global buffers completely thread-safe, with tests
...+int main(int argc, char *argv[]) >> +{ >> + drmVersionPtr version; >> + const char *device; >> + int err, fd, fd2; >> + struct nouveau_device *nvdev, *nvdev2; >> + struct nouveau_bo *bo; >> + >> + old_ioctl = dlsym(RTLD_NEXT, "ioctl"); >> + >> + pthread_t t1, t2; >> + >> + if (argc < 2) >> + device = default_device; >> + else >> + device = argv[1]; >> + >> + fd = open(device, O_RDWR); >> +...
2015 Feb 26
4
[PATCH v2 1/4] Add atomic_inc_return to atomics.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at ubuntu.com> --- xf86atomic.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xf86atomic.h b/xf86atomic.h index 8c4b696..17fb088 100644 --- a/xf86atomic.h +++ b/xf86atomic.h @@ -49,6 +49,7 @@ typedef struct { # define atomic_read(x) ((x)->atomic) # define atomic_set(x, val) ((x)->atomic = (val)) # define atomic_inc(x)
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
2020 Feb 13
1
[nbdkit PATCH v3] vddk: Drive library loading from libdir parameter.
...+ if (asprintf (&tmp, "%s/%s", dir, filename) >= 0) + filename = tmp; + } + + ret = orig_dlopen (filename, flags); + free (tmp); + return ret; +} + +static void constructor (void) __attribute__ ((constructor)); +static void +constructor (void) +{ + orig_dlopen = dlsym (RTLD_NEXT, "dlopen"); +} diff --git a/plugins/vddk/shim.h b/plugins/vddk/shim.h new file mode 100644 index 00000000..a9c202f0 --- /dev/null +++ b/plugins/vddk/shim.h @@ -0,0 +1,49 @@ +/* nbdkit + * Copyright (C) 2020 Red Hat Inc. + * + * Redistribution and use in source and binary forms, with or wi...
2006 Apr 05
23
DTrace as a security tool / http://systrace.org
I''d like to see if we can use DTrace to as the kernel implementation of the BSD systrace security policy system (http://www.systrace.org). I don''t really want to port systrace to Solaris because I think with DTrace we already have all the necessary in kernel hooks to do this. With systrace you express things like: "httpd can bind to port 80 but not any other port, it