2010-12-01 Kai Tietz <kai.tietz@onevision.com>
authorKai Tietz <kai.tietz@onevision.com>
Wed, 1 Dec 2010 14:15:06 +0000 (14:15 +0000)
committerKai Tietz <kai.tietz@onevision.com>
Wed, 1 Dec 2010 14:15:06 +0000 (14:15 +0000)
       PR binutils/11065
       * dlltool.c (dll_name_set_by_exp_name): New variable.
       (def_name): Allow setting of dll_name by .def file.
       (def_library): Likewise.
       (main): Set dll_name_set_by_exp_name, if dll_name is
       set indirect by exp_name.

binutils/ChangeLog
binutils/dlltool.c

index 140206bce1fc247c5b78fbb36e401a3ac0dd8b27..10a41408fd07be8380c3a8ad7ecf467f6bf94938 100644 (file)
@@ -1,3 +1,12 @@
+2010-12-01  Kai Tietz  <kai.tietz@onevision.com>
+
+       PR binutils/11065
+       * dlltool.c (dll_name_set_by_exp_name): New variable.
+       (def_name): Allow setting of dll_name by .def file.
+       (def_library): Likewise.
+       (main): Set dll_name_set_by_exp_name, if dll_name is
+       set indirect by exp_name.
+
 2010-11-26  Alan Modra  <amodra@gmail.com>
 
        * dwarf.c (decode_location_expression, display_debug_frames): Move
index 8c72647fe1ab0220bf9ba2718c496e9a27c4a9aa..80aac996fca06cfa54dd09e76ab99c11b2493754 100644 (file)
@@ -399,6 +399,7 @@ typedef struct identify_data_t
 static char *head_label;
 static char *imp_name_lab;
 static char *dll_name;
+static int dll_name_set_by_exp_name;
 static int add_indirect = 0;
 static int add_underscore = 0;
 static int add_stdcall_underscore = 0;
@@ -1089,6 +1090,11 @@ def_name (const char *name, int base)
   if (d_is_dll)
     non_fatal (_("Can't have LIBRARY and NAME"));
 
+  if (dll_name_set_by_exp_name && name && *name != 0)
+    {
+      dll_name = NULL;
+      dll_name_set_by_exp_name = 0;
+    }
   /* If --dllname not provided, use the one in the DEF file.
      FIXME: Is this appropriate for executables?  */
   if (!dll_name)
@@ -1105,6 +1111,12 @@ def_library (const char *name, int base)
   if (d_is_exe)
     non_fatal (_("Can't have LIBRARY and NAME"));
 
+  if (dll_name_set_by_exp_name && name && *name != 0)
+    {
+      dll_name = NULL;
+      dll_name_set_by_exp_name = 0;
+    }
+
   /* If --dllname not provided, use the one in the DEF file.  */
   if (!dll_name)
     set_dll_name_from_def (name, 1);
@@ -4177,6 +4189,7 @@ main (int ac, char **av)
       dll_name = xmalloc (len);
       strcpy (dll_name, exp_basename);
       strcat (dll_name, ".dll");
+      dll_name_set_by_exp_name = 1;
     }
 
   if (as_name == NULL)
This page took 0.029334 seconds and 4 git commands to generate.