[RFA] pei386 dll: auto-import patch

Charles Wilson cwilson@ece.gatech.edu
Thu Aug 2 11:23:00 GMT 2001

DJ Delorie wrote:

>> > Sorry, can't use snprintf.
>>Why not?
> Not all systems have it.  Think "cross compilers".


>>Like this?  ('course, you have to #include <math.h> for the ceil 
>>function.  Perhaps multiples of 128 or 256 would be better...bit 
>>shifting and masking is easy -- but not really portable...)
> Hmmm... You can avoid float math if you use a power of two:
> 	size = (size + 127) & ~127;

Okay, new binaries and source tarball (plus the patch, ChangeLog, TODO 
list, etc) are at:


This version supersedes the one I posted late last night, and includes 
all suggestions so far from DJ (including the non-float math above) and 
has been (minimally) tested by me.  Open issues (other than more 
thorough testing) are:

   make data_import_dll static?
     No, used in both pe.em and pe-dll.c
     I suppose we could rename it pe_data_import_dll.

   Ralf's bug report.  My intuition sez this is
     related to the data_import_dll thing.

I need to slow my breakneck pace here, and get some "real work" done. 
If somebody (Robert?  Paul?  Ralf?) could take a look at these two 
issues I'd appreciate it.


Done (in 20010801-2):

ld.texinfo: @cindex stuff
pe-dll.c (auto_export): replace #if 0 block with textual comment
pe-dll.c (make_import_fixup_mark): make static
pe-dll.c (add_bfd_to_link): revert to static
pe-dll.c (make_import_fixup_mark): dynamically size the
   fixup_name buffer. Use DJ's (x + 127) & ~127 logic.
pe.em: make __FUNCTION__ safe for %

Done (in 20010801-1):

1) --enable-gory-debug ==> --enable-extra-pe-debug
2) added --enable-auto-import option
3) made --disable-auto-import the default
4) encapsulated pe_dll_auto_import into bfd_link_info structure: new 
field "pei386_auto_import
5) changed pe_em(auto_export) filters to be table-based
6) moved detailed docs into ldint.texi
7) removed "bugger"
8) followed GNU coding style
9) removed ldlang.c patch
10) removed C++ comments

More information about the Cygwin-apps mailing list