Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: Dynamic loading on Cygwin - status
- X-seq: zsh-workers 12442
- From: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: "Peter Stephenson" <pws@xxxxxxx>, "Zsh hackers list" <zsh-workers@xxxxxxxxxxxxxx>
- Subject: RE: Dynamic loading on Cygwin - status
- Date: Mon, 31 Jul 2000 18:08:52 +0400
- Importance: Normal
- In-reply-to: <0FYK005CYET0JA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
>
>
> > > - external function or variable imported from another module is not
> > > considered
> > > a constant on Cygwin (actually, on Windows). Hence, any static
> initializer
> > > fails, e.g
> >
> > That is really bad.
>
> Isn't it enough to mark it as __attribute__((dllimport)) in the importing
^^^^^^^^^^^^^^^^^^^^^^^^^^
> file (assuming the symbol's exported in the first place, obviously)?
>
Exactly THIS makes them non-static. But it is not bad as I thought. We do not
need dllimport declaration for functions. We still do need them for variables.
I'll try it as soon as I have time to see, if some external variable is used
in static context.
(It is clear. In case of variables, compiler actually generates code to call a
function that returns address. Of course, you cannot call function to
intialize static variable. In case of function what gets linked into program
under function's name is a stub that calls "real" function under the name
__imp__<function>. Of course, we can always take an address of this stub - it
is perfectly static).
-andrej
Messages sorted by:
Reverse Date,
Date,
Thread,
Author