Search Results

Search: Posts Made By: lilezek
Forum: Programming 03-16-2011
8,219
Posted By Corona688
For starters you could answer the question I did...
For starters you could answer the question I did ask; are these programs in fact 32-bit? Is it only the 32-bit ones that are failing?

I'll add onto that, you can ldd /path/to/program and ldd...
Forum: Programming 03-16-2011
8,219
Posted By Corona688
I think you tried to preload the wrong library...
I think you tried to preload the wrong library there... Anyway:
Forum: Programming 03-16-2011
8,219
Posted By Corona688
Try export LD_PRELOAD="/usr/lib/speedhack.so" ...
Try export LD_PRELOAD="/usr/lib/speedhack.so"

Giving it the absolute path means you might even be able to keep it in /usr/local/lib/, not cluttered in with your actual system libraries.
...
Forum: Programming 03-15-2011
8,219
Posted By Corona688
No. But you could have your function check for...
No. But you could have your function check for things to decide whether it should act normally or not.

You could even have it call libc's own gettimeofday() by loading the symbol from libc with...
Forum: Programming 03-15-2011
8,626
Posted By Corona688
To mess with another process' memory in Linux you...
To mess with another process' memory in Linux you use ptrace (http://unix.stackexchange.com/questions/6301/how-do-i-read-from-proc-pid-mem-under-linux) as described here. This is the same way things...
Forum: Programming 03-14-2011
8,219
Posted By Corona688
Personally I would try to avoid using any stdio...
Personally I would try to avoid using any stdio functions inside a libc-level system library...
Forum: Programming 03-14-2011
8,219
Posted By Perderabo
You need a newline:printf("LOOOLAZO\n"); ...
You need a newline:printf("LOOOLAZO\n");


And we try to run a G rated forum here... please try to avoid the foul language.
Forum: Programming 03-14-2011
8,219
Posted By Corona688
You're not writing this in C++, are you? Your...
You're not writing this in C++, are you? Your gettimeofday function will be named some crazy operator-overloaded C++ hashed name.

[edit] Add this exact code to libkeepalive.c:

// below...
Forum: Programming 03-14-2011
8,219
Posted By Corona688
LD_PRELOAD will work for you then. Take a look...
LD_PRELOAD will work for you then. Take a look at the code used in libkeepalive, it overrides socket(), you should be able to override gettimeofday() the same way. Force your fake library to be...
Forum: Programming 03-14-2011
8,219
Posted By Corona688
You may be able to do this without resorting to...
You may be able to do this without resorting to hacking and recompiling your kernel, but it depends on your system, what is it?

libkeepalive (http://libkeepalive.sourceforge.net/) for instance...
Showing results 1 to 10 of 10

 
All times are GMT -4. The time now is 07:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy