2010-10-30 Kai Tietz <kai.tietz@onevision.com>
authorKai Tietz <kai.tietz@onevision.com>
Sat, 30 Oct 2010 17:14:02 +0000 (17:14 +0000)
committerKai Tietz <kai.tietz@onevision.com>
Sat, 30 Oct 2010 17:14:02 +0000 (17:14 +0000)
        * dlltool.c (scan_drectve_symbols): Allow quoted strings for -export
        directives.

binutils/ChangeLog
binutils/dlltool.c

index 8faa24207d544f09b7844c4a79b55876b4c168a5..16404436c9a2a1c6fa671685f37da3eec34d42e4 100644 (file)
@@ -1,3 +1,8 @@
+2010-10-30  Kai Tietz  <kai.tietz@onevision.com>
+
+       * dlltool.c (scan_drectve_symbols): Allow quoted strings for -export
+       directives.
+
 2010-10-29  Joseph Myers  <joseph@codesourcery.com>
 
        * readelf.c (display_tic6x_attribute): Use Tag_ABI_compatibility
index 3a91221c45e93268f7c4f56e373bde5eaeae22fb..8c72647fe1ab0220bf9ba2718c496e9a27c4a9aa 100644 (file)
@@ -1399,12 +1399,26 @@ scan_drectve_symbols (bfd *abfd)
          flagword flags = BSF_FUNCTION;
 
          p += 8;
-         name = p;
-         while (p < e && *p != ',' && *p != ' ' && *p != '-')
-           p++;
+         /* Do we have a quoted export?  */
+         if (*p == '"')
+           {
+             p++;
+             name = p;
+             while (p < e && *p != '"')
+               ++p;
+           }
+         else
+           {
+             name = p;
+             while (p < e && *p != ',' && *p != ' ' && *p != '-')
+               p++;
+           }
          c = xmalloc (p - name + 1);
          memcpy (c, name, p - name);
          c[p - name] = 0;
+         /* Advance over trailing quote.  */
+         if (p < e && *p == '"')
+           ++p;
          if (p < e && *p == ',')       /* found type tag.  */
            {
              char *tag_start = ++p;