Christopher Faylor wrote:


> I don't mind making another update if you think it is important.  I
> thought it would be nice for the current version to get some exercise
> first but if you think we need a new release, I'll make one.
> 
> Just send me the patch that turns on auto import by default, if that
> is what you want.


I've attached a patch that makes ld default to using 
--enable-auto-import.  However, I've also just submitted two patches to 
binutils.

The first attempts to fix the "pe_data_import_dll" variable defined in 
pe.em, used in pe-dll.c problem.  (The previous situation was ugly which 
was bad enough, but worse, it caused build failures on 
non-DLL-supporting pei386 platforms, like arm-epoc-pe.  I'm waiting for 
someone on one of those other affected platforms to verify that it works 
for them)

The second fixes the documentation to clarify the recent long long 
confusion.

I will also post both of those patches here, in a followup message to 
this one.  It's up to you, Chris, if you want to wait for those other 
two patches to be peer-reviewed and then apply all three, or just go 
ahead with this auto-import-default patch right away.  Or punt and do 
nothing at all. :-)

--Chuck
2001-09-21  Charles Wilson  <[EMAIL PROTECTED]>

        * emultempl/pe.em(gld_${EMULATION_NAME}_before_parse): 
        make --enable-auto-import the default
        (gld_${EMULATION_NAME}_list_options): indicate default
        status
Index: ld/emultempl/pe.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/pe.em,v
retrieving revision 1.52
diff -u -r1.52  old/ld/emultempl/pe.em new/ld/emultempl/pe.em
--- old/ld/emultempl/pe.em      2001/09/18 10:10:21     1.52
+++ new/ld/emultempl/pe.em      2001/09/21 06:09:51
@@ -173,7 +174,7 @@
 #ifdef DLL_SUPPORT
   config.dynamic_link = true;
   config.has_shared = 1;
-/* link_info.pei386_auto_import = true; */
+  link_info.pei386_auto_import = true;
 
 #if (PE_DEF_SUBSYSTEM == 9) || (PE_DEF_SUBSYSTEM == 2)
 #if defined TARGET_IS_mipspe || defined TARGET_IS_armpe
@@ -347,7 +348,7 @@
   fprintf (file, _("                                       importlib, use 
<string><basename>.dll \n"));
   fprintf (file, _("                                       in preference to 
lib<basename>.dll \n"));
   fprintf (file, _("  --enable-auto-import               Do sophistcated linking of 
_sym to \n"));
-  fprintf (file, _("                                       __imp_sym for DATA 
references\n"));
+  fprintf (file, _("                                       __imp_sym for DATA 
+references (default)\n"));
   fprintf (file, _("  --disable-auto-import              Do not auto-import DATA 
items from DLLs\n"));
   fprintf (file, _("  --enable-extra-pe-debug            Enable verbose debug output 
when building\n"));
   fprintf (file, _("                                       or linking to DLLs (esp. 
auto-import)\n"));

Reply via email to