|
From: Bill R. Jr. <bru...@te...> - 2003-11-14 17:15:03
|
On Fri, Nov 14, 2003 at 08:43:14AM -0800, Jeremy Fitzhardinge wrote:
> $ cd /usr/lib/tls
> $ mkdir hide
> $ mv ligGL* hide
>
> This works for me - but you need to make sure you always use
> LD_ASSUME_KERNEL=2.4.1 when you run your code without Valgrind.
You can avoid this by running valgrind in a private namespace,
and using bind-mounts to cover/hide the libraries.
There is as yet no standard exec-chaining utility (ala time(1),
nice(1), etc.) for creating a private namespace, but it is rather
trivial:
#include <syscall.h>
static inline _syscall2(int, clone, int, flags, int, foo)
#define CLONE_NEWNS 0x00020000 /* New namespace */
...
int pid = clone(CLONE_NEWNS | SIGCHLD,0);
if (pid == 0)
...
In your new namespace, just do
sudo mount -n --bind ...
to avoid mucking with /etc/mtab.
Regards,
Bill Rugolsky
|