This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re[2]: [RFA] pei386 dll: auto-import patch


Hello Robert,

Robert Collins wrote on Sunday, August 05, 2001:

[]

RC> Let me confirm I understand this:
RC> 1) The .dll created by --export-all-symbols and the new ld is _no_
RC> different than an old style dll.

    Yes, in the sense that it doesn't use any tricks in .idata
section. But if you'll build some dll with --export-all-symbols and
old vs new ld, images will be different in the symbols exported,
because new ld does more comprehensive symbol filtering.

RC> 2) The import library contains all the hints necessary to allow
RC> --auto-import to work.

    True.

RC> 3) Can we _in theory_ create new import libraries for ms dll's, and
RC> dll's built with old ld's?

    You can build implib from .def, so it reduces to making .def from
dll. Use your favorite tool for this. Mine is Anders Norlander's
pexports, I'm mainataining it now: binary available in
'altbinutils-pe' package at http://sourceforge.net/projects/mingwrep/
, source in the cvs of that project.

RC> 4) If so, how hard a patch to dlltool would that be?

    I propose to deprecate dlltool - it stayed behind development for
some time now (more precisely: ld's support of .def directives is more
comprehensive than dlltool's, but you better ask DJ about this). You
can do this now:

> ld --shared foo.def -o foo.dll --out-implib=liba.a

it does the job, but outputs undefineds:

> Cannot export bar: symbol not defined
> Cannot export foo: symbol not defined
> Creating library file: liba.a

It needs to be patched to suppress them. Note that -o is used to
specify name to put into implib (alternatively, LIBRARY clause in .def
can be used).


RC> Rob




--
Paul Sokolovsky, IT Specialist
http://www.brainbench.com/transcript.jsp?pid=11135



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]