mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Hardware > GPU Computing

Reply
 
Thread Tools
Old 2012-03-30, 10:06   #12
ldesnogu
 
ldesnogu's Avatar
 
Jan 2008
France

10000110012 Posts
Default

Quote:
Originally Posted by Dubslow View Post
But in order to get the faked library into the software, you would need to recompile? Because you have new source?
I'm not sure you read the page I linked or perhaps you misunderstood.

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
ldesnogu is offline   Reply With Quote
Old 2012-03-30, 10:11   #13
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

1C1D16 Posts
Default

...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
Dubslow is offline   Reply With Quote
Old 2012-03-30, 11:52   #14
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

893210 Posts
Default

Quote:
Originally Posted by Dubslow View Post
But in order to get the faked library into the software, you would need to recompile? Because you have new source?
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.
LaurV is offline   Reply With Quote
Reply

Thread Tools


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

All times are UTC. The time now is 05:38.

Mon Nov 30 05:38:32 UTC 2020 up 81 days, 2:49, 3 users, load averages: 0.98, 1.00, 1.16

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.