This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Need simple way to obtain symbols via dlsym()
- To: cygwin at cygwin dot com
- Subject: Need simple way to obtain symbols via dlsym()
- From: Michael McTernan <mm7323 at compsci dot bristol dot ac dot uk>
- Date: Fri, 20 Apr 2001 14:27:24 +0100 (BST)
Hi,
I'm using dlopen(NULL,x) to get a handle on the executable I am
running. This works fine.
I'm then using dlsym() to attempt to get at the symbols in the
executable. This works, but returns NULL for all symbols I try to get. I
think the problem is the following:
00807098 T _symbol_I_want
I think the 'T' needs to be a 'D' to enable dlsym() to find it?
I have been attempting to make this symbol take on a D by using different
methods, e.g. dlltool, ld and gcc options, but have had no luck. Is there
a simple way to do this?
Ideally I would like to be able to do something like:
__export_this int symbol_I_want(void) {}
And make it get exported in the declaration. Otherwise a simple tool that
will work like this could be very very cool:
makedynamic -e '.*_I_want' wanted.o
Am I on the right/wrong track O'great ones?
Cheers
Mike
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple