delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/04/20/09:45:31

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Fri, 20 Apr 2001 14:27:24 +0100 (BST)
From: Michael McTernan <mm7323 AT cs DOT bris DOT ac DOT uk>
X-Sender: mm7323 AT tao
To: cygwin AT cygwin DOT com
Subject: Need simple way to obtain symbols via dlsym()
Message-ID: <Pine.SOL.4.21.0104201419070.5238-100000@tao>
MIME-Version: 1.0

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019