oad_preload_objects(char *);
static Obj_Entry *load_object(char *);
static void lock_check(void);
static Obj_Entry *obj_from_addr(const void *);
@@ -359,7 +361,9 @@
sym_zero.st_shndx = SHN_ABS;
dbg("loading LD_PRELOAD libraries");
-if (load_preload_objects()
In article <[EMAIL PROTECTED]>, Karl Pielorz
<[EMAIL PROTECTED]> wrote:
> One of the ways I've tried implementing syscalls is to dlopen() the
> correct library, and fetch the routines address from there (using
> dlsym) - and calling the routine that way...
>
> This doesn't seem to help though :(
Bjoern Fischer wrote:
> To wrap libc functions you have to use dlsym() with the special
> handle RTLD_NEXT to get the next incarnation of your function.
> E.g. you want to wrap fchmod(), so write your own fchmod() and
> after you `corrected' the params you may have to call the `real'
> fchmod().
ore an
>executable... I've gotten everything to compile, and the LD_PRELOAD works, but
>a lot of syscall's from the wrapper library fail either with bizare messages
>such as "malloc(): recursive call", or just die horibly (segmentation faults,
>and all sorts).
[...]
Karl Pielorz <[EMAIL PROTECTED]> wrote:
>
>One of the ways I've tried implementing syscalls is to dlopen() the correct
>library, and fetch the routines address from there (using dlsym) - and calling
>the routine that way...
>
>This doesn't seem to help though :(
I've made this work across Solaris
On Thu, Aug 03, 2000 at 11:25:27AM +0100, Karl Pielorz wrote:
> The code is a 'wrapper' / 'shim' that's meant to be LD_PRELOAD'ed before an
> executable... I've gotten everything to compile, and the LD_PRELOAD works, but
> a lot of syscall's
Daniel O'Connor wrote:
>
> On 03-Aug-00 Karl Pielorz wrote:
> > Any pointers would be greatefuly received, unfortunately this all works
> > under
> > Linux (I'm not bashing anyone on the head with that, I'm far more interested
> > in getting it working under FreeBSD)...
>
> I think the pro
On 03-Aug-00 Karl Pielorz wrote:
> Any pointers would be greatefuly received, unfortunately this all works
> under
> Linux (I'm not bashing anyone on the head with that, I'm far more interested
> in getting it working under FreeBSD)...
I think the problem is that your calls are being resolve
Hi All,
I'm working on some code that runs fine on Linux, but not under FreeBSD...
Trying to port the code is proving to be a pain...
The code is a 'wrapper' / 'shim' that's meant to be LD_PRELOAD'ed before an
executable... I've gotten everything to comp
x. (This implies that the Solaris rtld documentation
isn't quite complete regarding its support for C++ mechanisms.)
static void startup(void) __attribute__ ((constructor));
>>> You're probably the first person on earth to
>>> have more than one library in LD_PRELOAD. :-)
C++ and use a global constructor.
>
> No. Never. No way. NO. :-)
I didn't mean write everything in C++ -- just the
initialization hook. It's not that bad. There's an example in
"src/lib/libc_r/uthread/uthread_autoinit.cc".
The advantage of using C++ for this is
John Polstra <[EMAIL PROTECTED]> wrote:
>Tony Finch <[EMAIL PROTECTED]> wrote:
>>
>> I'm experimenting with using LD_PRELOAD to implement "shim"
>> wrappers around functions in libc. The first problem I had was
>> compiling my shim library so
In article <[EMAIL PROTECTED]>,
Tony Finch <[EMAIL PROTECTED]> wrote:
> I'm experimenting with using LD_PRELOAD to implement "shim" wrappers
> around functions in libc. It's really easy to do on Solaris but I'm
> having some difficulty on FreeBSD.
Tony Finch <[EMAIL PROTECTED]> wrote:
>
> This brings me on to the second problem. I want to do some
> initialization of my library before the real action starts. On Solaris
> the linker calls a function in the object called _init() when it is
> loaded; it's easy to make this work. I can see simi
I'm experimenting with using LD_PRELOAD to implement "shim" wrappers
around functions in libc. It's really easy to do on Solaris but I'm
having some difficulty on FreeBSD.
The first problem I had was compiling my shim library so that the rtld
would accept it. On Solar
15 matches
Mail list logo