Subject: Ann: patched dlltool and new cygshared available
From: [email-masked] (Roger René Kommer)

10 Mar 1998 08:54:15 -0800
Message-ID: <01bd4b86$571162e0$60040d8d.cygnus.gnu-win32@ROGKOMUN>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
To: <[email-masked]>

Hi,
I've uploaded a patched version of dlltool.exe (including precompiled
dlltool.exe and diff for b19)
ftp://ftp.isp.uni-kassel.de/gnuwin32/dlltool_105.zip

Following modification are made in this version 105 of dlltool.
Introduce a version number, which can be displayed with the --version
option.
--version
Displays a version number (105)
--ie <label>
--ignore-exports <file>
Ignores <label> or all names listed in <file> while generating an import
library from a DLL with the option --output-lib.
With
nm $DLLOBJECTS | grep '^........ [BCDRT] _' | sed 's/[^_]*_//' | sort | uniq
>> ${libname}.def
you can generate a .def file, which exports all public/global names which
can found in $DLLOBJECTS. You also exports global data, which cannot be
accessed directly from outside the DLL via 'label', but with the pointer to
this global data '__imp_label' (or in older versions '_imp__label').

With
nm $DLLOBJECTS  | grep '^........ [BCDR] _' | sed 's/[^_]*_//' | sort | uniq
> ${libname}.ignexp
you can generate a .ignexp, which excludes all global names - excepting
function entries - from exporting via an import library (libMYDLL.a).
example:
dlltool --as=as --dllname MYDLL.dll \
    --def MYDLL.def \
    --ignore-exports MYDLL.ignexp \
    --output-lib libMYDLL.a
Different to the original b19 dlltool.exe, you receive an error message from
your linker if you try to use DLL's global data <label> in your executable.
These options are also used in the shell script cygshared, which wrap most
things regarding building DLL's.
I've also include a new version of cygshared - which supports b18, b19 and
this patched version of dlltool -, and a testsuite for generating DLL's,
including importing DLL's global data and global C++-classes inside a DLL.
You can use this bunch of sources also as demonstration, how to use
cygshared in your project.
Roger Rene Kommer
[email-masked]

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".