This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

(patch) pe-dll bug fix


The following fixes two small bugs:
 
  - use the correct name for output dll. Currently it mistakenly uses the
    import library name for DLL name, which is of course incorrect.
  - allow names with "." in the LIBRARY or NAME directive the DEF files.

1999-12-23  Mumit Khan  <khan@xraylith.wisc.edu>

	* pe-dll.c (pe_dll_generate_implib): Use the correct name for output 
	dll.
        * deffilep.y (opt_name): Allow "." in name.

Index: pe-dll.c
===================================================================
RCS file: /homes/khan/src/CVSROOT/binutils-19990911/ld/pe-dll.c,v
retrieving revision 1.5
diff -u -3 -p -r1.5 pe-dll.c
--- pe-dll.c	1999/12/23 19:47:22	1.5
+++ pe-dll.c	1999/12/23 23:49:00
@@ -1458,14 +1458,7 @@ pe_dll_generate_implib (def, impfilename
   bfd *outarch;
   bfd *head = 0;
 
-  dll_filename = def->name;
-  if (dll_filename == 0)
-    {
-      dll_filename = dll_name;
-      for (i=0; impfilename[i]; i++)
-	if (impfilename[i] == '/' || impfilename[i] == '\\')
-	  dll_filename = impfilename+1;
-    }
+  dll_filename = (def->name) ? def->name : dll_name;
   dll_symname = xstrdup (dll_filename);
   for (i=0; dll_symname[i]; i++)
     if (!isalnum ((unsigned char) dll_symname[i]))
Index: deffilep.y
===================================================================
RCS file: /homes/khan/src/CVSROOT/binutils-19990911/ld/deffilep.y,v
retrieving revision 1.2
diff -u -3 -p -r1.2 deffilep.y
--- deffilep.y	1999/12/23 07:53:26	1.2
+++ deffilep.y	1999/12/24 00:11:00
@@ -215,7 +215,13 @@ attr:
 	;
 
 opt_name: ID		{ $$ = $1; }
-	|		{ $$ = 0; }
+	| ID '.' ID	
+	  { 
+	    char *name = xmalloc (strlen ($1) + 1 + strlen ($3) + 1);
+	    sprintf (name, "%s.%s", $1, $3);
+	    $$ = name;
+	  }
+	|		{ $$ = ""; }
 	;
 
 opt_ordinal: 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]