PATCH Revise Windows dlltool --ext-prefix-alias

Aaron W. LaFramboise aaron98wiridge9@aaronwl.com
Sun Oct 17 03:00:00 GMT 2004


In the initial implementation
<http://sources.redhat.com/ml/binutils/2004-07/msg00130.html>, the alias
symbols are put into the same object as the normal export symbols.  This
prevents one from defining a symbol with either of these names if the
the other name is used.  As the intent of the original patch was to
support this very practice, this is something of a bug.

With this patch, the aliases are put into their object.  (This has the
downside of doubling the import library size, but only if
--ext-prefix-alias is used).  This is accomplished by adding a new
struct export member, import_name, and moving the alias code from
make_one_lib_file() to gen_lib_file().  A hard coded maximum number of
imports is introduced (PREFIX_ALIAS_BASE = 20000), but again only when
this flag is used.

I've also added two tests that verify that this option is doing the
right thing.  To invoke dlltool to create an import library, I needed to
supply dlltool with as's path.  The code to set up tmpdir/gas was broken
for Windows, so I changed the code in config/default.exp to use cp
instead of ln -s and added a procedure exe_ext.

Tested on i686-pc-mingw32.  I have a copyright assignment but no CVS access.

Aaron W. LaFramboise
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: binutils-head-20041016-alias.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20041017/0f7d2129/attachment.ksh>


More information about the Binutils mailing list