zsh-workers
 help / color / mirror / code / Atom feed
From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: "Peter Stephenson" <pws@csr.com>,
	"Zsh hackers list" <zsh-workers@sunsite.auc.dk>
Subject: RE: Dynamic loading on Cygwin - status
Date: Mon, 31 Jul 2000 18:08:52 +0400	[thread overview]
Message-ID: <000001bffaf8$daeb7280$21c9ca95@mow.siemens.ru> (raw)
In-Reply-To: <0FYK005CYET0JA@la-la.cambridgesiliconradio.com>

>
>
> > > - 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


      reply	other threads:[~2000-07-31 14:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-28 14:51 Andrej Borsenkow
2000-07-28 16:17 ` Andrej Borsenkow
2000-07-31 13:58   ` Peter Stephenson
2000-07-31 14:08     ` Andrej Borsenkow [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000001bffaf8$daeb7280$21c9ca95@mow.siemens.ru' \
    --to=andrej.borsenkow@mow.siemens.ru \
    --cc=pws@csr.com \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).