* deffilep.y: properly handle relocs with multiple def_files,
authorDJ Delorie <dj@redhat.com>
Tue, 10 Nov 1998 03:54:00 +0000 (03:54 +0000)
committerDJ Delorie <dj@redhat.com>
Tue, 10 Nov 1998 03:54:00 +0000 (03:54 +0000)
cache import module names

ld/ChangeLog
ld/deffile.h
ld/pe-dll.c

index ea7dd5a1996873905ddf6987d7dee0bd215ddc42..befc972d2e8f9b13a0df249ab9cbecab31c8f6b8 100644 (file)
@@ -1,3 +1,8 @@
+Mon Nov  9 22:52:50 1998  DJ Delorie  <dj@indy.delorie.com>
+
+       * deffilep.y: properly handle relocs with multiple def_files,
+       cache import module names
+
 Mon Nov  9 22:44:58 1998  DJ Delorie  <dj@cygnus.com>
 
        * pe-dll.c (process_def_file): don't assume exports won't move
index 255739db8a931ccb9ec0457c640e85ea5fdcc9aa..fd5661a33ac23fbed23169402dcb7da1ccebb4ed 100644 (file)
@@ -41,10 +41,18 @@ typedef struct def_file_export
   }
 def_file_export;
 
+typedef struct def_file_module
+  {
+    struct def_file_module *next;
+    void *user_data;
+    char name[1]; /* extended via malloc */
+  }
+def_file_module;
+
 typedef struct def_file_import
   {
     char *internal_name;       /* always set */
-    char *module;              /* always set */
+    def_file_module *module;   /* always set */
     char *name;                        /* may be NULL; either this or ordinal will be set */
     int ordinal;               /* may be -1 */
   }
@@ -73,6 +81,9 @@ typedef struct def_file
     int num_exports;
     def_file_export *exports;
 
+    /* used by imports for module names */
+    def_file_module *modules;
+
     /* from the IMPORTS commands */
     int num_imports;
     def_file_import *imports;
index 72444c0e8084640fd852bcb60d999c28807c0415..d2f77f33176eabceeedbec93eddf4a8f80ae9a4c 100644 (file)
@@ -268,7 +268,7 @@ process_def_file (abfd, info)
        }
     }
 
-  e = pe_def_file->exports;    /* convenience */
+  e = pe_def_file->exports; /* convenience, but watch out for it changing */
 
   exported_symbol_offsets = (bfd_vma *) xmalloc (NE * sizeof (bfd_vma));
   exported_symbol_sections = (struct sec **) xmalloc (NE * sizeof (struct sec *));
@@ -859,7 +859,7 @@ pe_dll_generate_def_file (pe_out_def_filename)
              quoteput (im->internal_name, out, 0);
              fprintf (out, " = ");
            }
-         quoteput (im->module, out, 0);
+         quoteput (im->module->name, out, 0);
          fprintf (out, ".");
          if (im->name)
            quoteput (im->name, out, 0);
This page took 0.033418 seconds and 4 git commands to generate.