* pe-dll.c (process_def_file): auto-export data items also
authorDJ Delorie <dj@redhat.com>
Mon, 17 Jul 2000 18:40:47 +0000 (18:40 +0000)
committerDJ Delorie <dj@redhat.com>
Mon, 17 Jul 2000 18:40:47 +0000 (18:40 +0000)
(pe_process_import_defs): also see if _imp_ form needed

ld/ChangeLog
ld/pe-dll.c

index a347f2c34ecb2c5f99c603136aff01b5ddac64d3..24529c3aae3aae9fefcb2fe126cf38d8f13d8e0f 100644 (file)
@@ -1,3 +1,8 @@
+2000-07-17  DJ Delorie  <dj@cygnus.com>
+
+       * pe-dll.c (process_def_file): auto-export data items also
+       (pe_process_import_defs): also see if _imp_ form needed
+
 2000-07-12  Charles Wilson  <cwilson@ece.gatech.edu>
 
        * pe-dll.c (make_one): fix a typo in the __imp_ name decoration
index ad7b28a5308898546704c2a5b799d4448a790b04..3fdcbba4df33b274bdb50264c18532a438c376dc 100644 (file)
@@ -301,8 +301,7 @@ process_def_file (abfd, info)
 
          for (j = 0; j < nsyms; j++)
            {
-             if ((symbols[j]->flags & (BSF_FUNCTION | BSF_GLOBAL))
-                 == (BSF_FUNCTION | BSF_GLOBAL))
+             if (symbols[j]->flags & BSF_GLOBAL)
                {
                  const char *sn = symbols[j]->name;
                  if (*sn == '_')
@@ -1661,10 +1660,17 @@ pe_process_import_defs (output_bfd, link_info)
            struct bfd_link_hash_entry *blhe;
 
            /* see if we need this import */
-           char *name = (char *) xmalloc (strlen (pe_def_file->imports[i].internal_name) + 2);
+           char *name = (char *) xmalloc (strlen (pe_def_file->imports[i].internal_name) + 2 + 6);
            sprintf (name, "%s%s", U(""), pe_def_file->imports[i].internal_name);
            blhe = bfd_link_hash_lookup (link_info->hash, name,
                                         false, false, false);
+           if (!blhe || (blhe && blhe->type != bfd_link_hash_undefined))
+             {
+               sprintf (name, "%s%s", U("_imp__"),
+                        pe_def_file->imports[i].internal_name);
+               blhe = bfd_link_hash_lookup (link_info->hash, name,
+                                            false, false, false);
+             }
            free (name);
            if (blhe && blhe->type == bfd_link_hash_undefined)
              {
This page took 0.029188 seconds and 4 git commands to generate.