Apply patch from Mumit Khan to fix bugs generating dll names.
authorNick Clifton <nickc@redhat.com>
Tue, 4 Jan 2000 23:30:51 +0000 (23:30 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 4 Jan 2000 23:30:51 +0000 (23:30 +0000)
ld/ChangeLog
ld/deffilep.y
ld/pe-dll.c

index cc26ce065704addb3b9a01d913b588b9bdec196e..2ab6c95fe7bdb57328152112ab99243edb0db428 100644 (file)
@@ -1,3 +1,9 @@
+2000-01-04  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.
+
 1999-12-02  Nick Clifton  <nickc@cygnus.com>
 
        * Makefile.am: Fix arm-epoc-pe dependencies.
index 31aa703a917d951d4dffffa3604a3c82ed7acd67..6b17e55817e6f0b4b57dce29113a1081eb2d95f5 100644 (file)
@@ -214,7 +214,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 657f41dae3aceda3e02b9d4309a455b7d3d616b1..afb7edd60c4ece69fc91c661e05887f5be2b6927 100644 (file)
@@ -1455,14 +1455,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]))