Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Date: Wed, 11 Oct 2000 23:19:48 -0400
From: Jason Tishler <Jason.Tishler@dothill.com>
To: Venkat Iyer <venkat@comit.com>
Cc: cygwin@sourceware.cygnus.com
Subject: Re: Exporting symbols from an executable
Message-ID: <20001011231948.A1023@OLMY>
References: <14819.48654.198000.271875@gargle.gargle.HOWL>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <14819.48654.198000.271875@gargle.gargle.HOWL>; from venkat@comit.com on Tue, Oct 10, 2000 at 06:10:38PM -0700
Organization: Dot Hill Systems Corp.

Venkat,

On Tue, Oct 10, 2000 at 06:10:38PM -0700, Venkat Iyer wrote:
> I've read everything I could (including libtool, dlltool, gcc, ld
> documentation, cygwin archives, and google and alltheweb searches),
> and still haven't managed to make this work.
> 
> I want to export symbols from an executable, so that they can be used
> to resolve symbols at run time from dlopen'ed libraries.

I tried to get your small example to work but unfortunately, I was
unsuccessful.  However, I can point out two things that I think will be
useful:

1. When I use MS's dumpbin /exports on the a.exe produced from your
build procedure, I noticed that f1 was NOT exported.

2. I suggest that you examine how PostgreSQL 7.0.2 builds postgres.exe and
pgplsql.dll.  Their procedure enables postgres.exe to export symbols that
are used by pgplsql.dll which is eventually dlopen'd into postgres.exe
(if the DBA enables the PL procedural language).  Although, the build
procedure is somewhat convoluted and uses dlltool/dllwrap instead of
gcc directly, it does produce an executable that exports symbols.

You can find the PostgreSQL source at:

    ftp://postgresql.readysetnet.com/pub/postgresql/v7.0.2/postgresql-7.0.2.tar.gz

and a PostgreSQL build/install howto at:

    http://people.freebsd.org/~kevlo/postgres/portNT.html

BTW, does anyone know how to dump the exported symbols of a DLL/EXE using
one of the binutils tools?  That is, without resorting to using MS's dumpbin.

Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corporation         Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

