Don't re-export auto-import symbols.
authorNick Clifton <nickc@redhat.com>
Mon, 7 Oct 2002 16:36:11 +0000 (16:36 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 7 Oct 2002 16:36:11 +0000 (16:36 +0000)
ld/ChangeLog
ld/pe-dll.c

index 7961079ad281c3e2e39a7ba803b7edc4733ee67c..c2575d53f1ada91f96a461dd2fcf77b7cdfea7a9 100644 (file)
@@ -1,3 +1,9 @@
+2002-10-07  Ralf Habacker  <Ralf.Habacker@freenet.de>
+
+       * pe-dll.cc (autofilter_symbolprefixlist): Don't re-export
+       auto-import symbols.
+       (make_one): Create _nm_<symbol> for data only.
+
 2002-10-05  Elias Athanasopoulos  <eathan@otenet.gr>
 
        * ldlang.c (lang_file_exist): New function.
index fd70c781b55e4ced87fc996568995e565eec400a..367759a114459eb4da72e5984f9c287473989faa 100644 (file)
@@ -257,6 +257,8 @@ static autofilter_entry_type autofilter_symbolprefixlist[] =
   /*  { "__imp_", 6 }, */
   /* Do __imp_ explicitly to save time.  */
   { "__rtti_", 7 },
+  /* Don't re-export auto-imported symbols.  */
+  { "_nm_", 4 },
   { "__builtin_", 10 },
   /* Don't export symbols specifying internal DLL layout.  */
   { "_head_", 6 },
@@ -1814,8 +1816,10 @@ make_one (exp, parent)
   quick_symbol (abfd, U ("_head_"), dll_symname, "", UNDSEC, BSF_GLOBAL, 0);
   quick_symbol (abfd, U ("_imp__"), exp->internal_name, "", id5, BSF_GLOBAL, 0);
   /* Symbol to reference ord/name of imported
-     symbol, used to implement auto-import.  */
-  quick_symbol (abfd, U("_nm__"), exp->internal_name, "", id6, BSF_GLOBAL, 0);
+     data symbol, used to implement auto-import.  */
+  if (exp->flag_data)
+    quick_symbol (abfd, U("_nm__"), exp->internal_name, "", id6,
+                 BSF_GLOBAL,0);
   if (pe_dll_compat_implib)
     quick_symbol (abfd, U ("__imp_"), exp->internal_name, "",
                  id5, BSF_GLOBAL, 0);