LD_PRELOAD and C++ code

Dan Myers dmyers@umiacs.umd.edu
Wed Mar 17 16:38:00 GMT 2004


Hi all,
	I have a question about using LD_PRELOAD/dlsym() to wrap library functions.
Specifically, suppose I have some program compiled with gcc, and some shared
library of wrapper functions that use C++ and are compiled with g++. Assuming
the wrapper functions are declared extern "C", should I expect this to work?
It seems to work in some cases but not in others, so I'm curious if anyone has
a definitive answer.

Thanks,
Daniel

-- 
Daniel Myers
Comparative Genomics Laboratory
Center for Bioinformatics and Computational Biology
University of Maryland
Agri/LFSc Surge Building #296
College Park, MD 20742-3360
dmyers@umiacs.umd.edu
301.405.1262 work
http://serine.umiacs.umd.edu/personnel/myers_daniel/
-
"Think of your breed; for brutish ignorance / Your mettle was not made; you 
were made men / To follow after knowledge and excellence."
As if I also was hearing for the first time: like the blast of a trumpet, 
like the voice of God. For a moment I forget who I am and where I am.
--Primo Levi, Survival in Auschwitz 



More information about the Binutils mailing list