This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
LD_PRELOAD and C++ code
- From: Dan Myers <dmyers at umiacs dot umd dot edu>
- To: binutils at sources dot redhat dot com
- Date: Wed, 17 Mar 2004 11:38:54 -0500
- Subject: LD_PRELOAD and C++ code
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