![]() |
|
|
#12 | |
|
Jan 2008
France
3·199 Posts |
Quote:
You just have to compile your interposing library, the original application does not need to change. In the above page, the original application is named "test". If you run it without LD_PRELOAD, it behaves as expected; if you run it with LD_PRELOAD, then your original "test" will call your own implementation of getpid (which in turn runs the original system getpid after printing a message). EDIT: Forgot to say, it's the mechanism used for instance to trace library calls in existing applications Last fiddled with by ldesnogu on 2012-03-30 at 10:06 |
|
|
|
|
|
|
#13 |
|
Basketry That Evening!
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88
722110 Posts |
...exposing my ignorance about libraries and linking and crap
(any links are appreciated)The only things I know how to do with gcc are -g, -o, and -O, and I've never even used the last one :P |
|
|
|
|
|
#14 |
|
Romulan Interpreter
"name field"
Jun 2011
Thailand
283316 Posts |
You do not need to recompile the software. Think about CudaLucas or mfaktc, they use external dlls like "cudart64_41_28.dll", the programs will first look into current folder. If you have a fake cudartxx or cufftxx there, the system (installed) library is hidden. If you want to "overwrite" only some functions, your dll still have to load the original dll and call the original functions which you don't want overridden.
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| New GPU Compute System | airsquirrels | GPU Computing | 90 | 2017-12-08 00:13 |
| [YASQ] Yet Another Stupid Question - Factoring capability ?? | Twh0re | NFS@Home | 23 | 2015-05-06 12:28 |
| Low-powered motherboard of adequate capability sought | fivemack | Hardware | 1 | 2011-12-21 19:26 |
| New Compute Box | Christenson | Hardware | 0 | 2011-01-15 04:44 |
| My throughput does not compute... | petrw1 | Hardware | 9 | 2007-08-13 14:38 |