delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/11/16/14:49:32

From: Eligis AT wanadoo DOT fr (Christian Jullien)
Subject: RE: dlopen patch [was Re: dlopen]
16 Nov 1998 14:49:32 -0800 :
Message-ID: <000101be116b$42ca0020$020039c1.cygnus.gnu-win32@young>
References: <Pine DOT SUN DOT 3 DOT 93 DOT 981116011414 DOT 24494A-101000 AT modi DOT xraylith DOT wisc DOT edu>
Mime-Version: 1.0
To: "Mumit Khan" <khan AT xraylith DOT wisc DOT edu>
Cc: "Gary V. Vaughan" <gvaughan AT oranda DOT demon DOT co DOT uk>,
"Geoffrey Noer" <noer AT cygnus DOT com>,
"Jorrit Tyberghein" <Jorrit DOT Tyberghein AT uz DOT kuleuven DOT ac DOT be>,
<gnu-win32 AT cygnus DOT com>

It could works but not for me !!!
I have ~50000 lines or so automatically generated .s files from a virtual
machine called LLM3 and I must also have access to my assembler symbols.
For an historical reason, all public assembler symbols have NO leading '_'
(i.e. foo is
just called 'foo' not '_foo').
It's the way it works on Linux, SCO, Solaris, unixware, DOS, NT, ...
On unix systems, it just works fine with 'old' nlist interface or more
modern dlopen/dlsym calls. On DOS, NT I've made the same hugly hack with (2
additional links).
Here, of course, dlltool removes leading '_' to match the name you wrote,
not the internal one.
On link, I just got 'foo' undefined because it assumes it's _foo and _foo is
not defined.
I'm so sade.


> -----Original Message-----
> From: Mumit Khan [mailto:khan AT xraylith DOT wisc DOT edu]
> Sent: Monday, November 16, 1998 8:16 AM
> To: Christian Jullien
> Cc: Gary V. Vaughan; Geoffrey Noer; Jorrit Tyberghein;
> gnu-win32 AT cygnus DOT com
> Subject: RE: dlopen patch [was Re: dlopen]
>
>
> "Christian Jullien" <Eligis AT wanadoo DOT fr> writes:
> >
> > But it does not work since all symbols MUST be exported (am I
> right ?). In
> > my special case I can't export all symbols,
> > I've also a lot (>= 50000) generated assembler lines.
>
> That's correct. Of course, the solution is simple since all you need to
> do is to link with an export file (dlltool can create that easily), and
> with Gary's patch you can dlopen/dlsym the function quite easily.
>
> > If you have a better solution I will be happy to test it
> (and/or to improve
> > it).
>
> I'm attaching a trivial example (to run this, you have to have Gary's
> patch or wait for b20.1). Please let me know if this doesn't work for
> your application.
>
> btw, a good example for this is in Perl's configuration, where perl is
> built as an exportable executable. You can also use dllwrap (with a
> few extra semi-documented flags), but it's just as easy doing it using
> the simple Makefile included in my example.
>
> Regards,
> Mumit
>
>

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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