public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Re: .def files, ordinals, and dlls
       [not found] <3B2658CA.AFE25B71@ece.gatech.edu>
@ 2001-06-12 15:47 ` Robert Collins
  0 siblings, 0 replies; only message in thread
From: Robert Collins @ 2001-06-12 15:47 UTC (permalink / raw)
  To: Charles S. Wilson, cygwin-apps; +Cc: binutils

I've copied binutils in on this, as this is a ld issue more than a
cygwin apps issue.

----- Original Message -----
From: "Charles S. Wilson" <cwilson@ece.gatech.edu>
To: <cygwin-apps@cygwin.com>
Sent: Wednesday, June 13, 2001 4:00 AM
Subject: .def files, ordinals, and dlls


> However, BOTH dlls, tiff-3.5.5-3 and tiff-3.5.6beta-1 contained that
> symbol, just at different ordinal positions.  Both versions used the
> same .def file, and did NOT specify "NONAME" -- so presumably, all
> symbols were exported by name and ordinal, and xemacs *supposedly* was
> linked "by name" -- the "supposed" default for ld.
>
> There are actually two problems here:
>
> 1) why did XEmacs break -- obviously it's a link-by-ordinal problem
> since both DLL's contained exactly the same symbol exports, just with
> different ordinals.  But if ld "links-by-name" by default, then why
did
> this problem occur?

Gulp. Uhmmm.. ouch. Yes, that's the right word, ouch. what does the
import table of XEmacs show?

> 2) why did the two tiff packages, which both used the same .def file,
> assign variant ordinals to the exports?  In some cases, the actual
> ordinals in the dll's were DIFFERENT than those specified in the .def
> file -- but 3.5.5-3 differed from the def file "differently" than
> 3.5.6beta-1 differed from the def file. (Got that?)  One possible
clue:
> there are 100 __declspec'ed exports, but the .def file specified only
75
> of them.  Both dll's contained all 100 exports -- but not only were
the
> "extra" 25 exports differently assigned, but also the 75 .def'ed
exports
> were not assigned the same ordinals in the two dlls (which in some
> cases, ALSO differed from the ordinal numbers EXPLICITLY given in the
> .def file!!)

Perhaps a bug in ld?

> I worked around the problem by using objdump on the 3.5.5-3 dll, and
> recreating a new .def file that specified all 100 exports.  I used
this
> new .def file in 3.5.6beta-2, and ended up with a dll that used the
same
> ordinals as 3.5.5-3 for all 100 exports.
>
> Who was it that said ld's export behavior was deterministic? Was that
> you, Robert? :-)

*blush*. I'm going to go now :]. More seriously I'm going to generate a
testcase and see If I can trigger this with my hacked up libtool.

Rob

>
> --Chuck
>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-06-12 15:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3B2658CA.AFE25B71@ece.gatech.edu>
2001-06-12 15:47 ` .def files, ordinals, and dlls Robert Collins

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