public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Ralf Habacker" <Ralf.Habacker@saght.tessag.com>
To: "Binutils" <binutils@sources.redhat.com>
Cc: "Andrew Begel" <abegel@eecs.berkeley.edu>
Subject: AW: dlltool not creating a proper import library
Date: Mon, 04 Jun 2001 23:31:00 -0000	[thread overview]
Message-ID: <004701c0ed89$8f6690e0$6e032bb7@BRAMSCHE> (raw)
In-Reply-To: <B7D7A2ED64049746BBCDFB0DA028CC5404A54A@ups.millennium.berkeley.edu>

> Von: binutils-owner@sources.redhat.com
> [ mailto:binutils-owner@sources.redhat.com]Im Auftrag von Andrew Begel
> Gesendet am: Dienstag, 5. Juni 2001 01:02
> An: binutils@sources.redhat.com
> Cc: abegel@cs.berkeley.edu
> Betreff: dlltool not creating a proper import library
>
> I'm try to use the Mingw32 dlltool to produce an import library from a
> .def file I've got. But, the generated import library seems to be
> missing a symbol that ld wants to see when it links the import library
> with my code.
>
> When gcc -shared creates a DLL and associated import library (using the
> -Wl,--outimp=libfoo.dll.a flag), for each exported symbol, in the
> libfoo.dll.a file there are three symbols. One is the original symbol
> _bar, the second is
> __imp__bar, and the third is __nm__bar.=20
>
> However, when I use dlltool to make an import library from a .def file,
> I only get two  symbols for each exported symbol: _bar and __imp_bar.
> When I try to link a DLL from a static library that contains my
> generated import library (from the .def file), ld complains that
> I'm missing the __nm__bar symbol:
>
> i.e. nmth000000.o(.idata$4+0x0): undefined reference to `_nm__bar'
>
> Before this error, I get a warning about the symbol:
>
> Warning: resolving _bar by linking to __imp__bar (auto-import)
>
It seems that you are using an ld with the auto import option provided by
Paul Sokolvsky.
This ld contains an additional patch for skipping
__declspec(dllimport/dllexport)
Look at the sourceforge mingw project for additional information.

Ralf Habacker

      parent reply	other threads:[~2001-06-04 23:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-04 16:01 Andrew Begel
2001-06-04 16:39 ` DJ Delorie
2001-06-04 23:31 ` Ralf Habacker [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='004701c0ed89$8f6690e0$6e032bb7@BRAMSCHE' \
    --to=ralf.habacker@saght.tessag.com \
    --cc=abegel@eecs.berkeley.edu \
    --cc=binutils@sources.redhat.com \
    /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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).