summaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorKai Tietz <kai.tietz@onevision.com>2010-10-30 17:14:02 +0000
committerKai Tietz <kai.tietz@onevision.com>2010-10-30 17:14:02 +0000
commit5df46b9134041f52aa33c7252c5714767eff7ac5 (patch)
tree4fcf6a1cefff22154bc8ed3fa87ed331bd96f9fa /binutils
parente83f2cdb9a77350370b96952e54bb785d1c84f4e (diff)
downloadbinutils-redhat-5df46b9134041f52aa33c7252c5714767eff7ac5.tar.gz
2010-10-30 Kai Tietz <kai.tietz@onevision.com>
* dlltool.c (scan_drectve_symbols): Allow quoted strings for -export directives.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/dlltool.c20
2 files changed, 22 insertions, 3 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 8faa24207d..16404436c9 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -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
diff --git a/binutils/dlltool.c b/binutils/dlltool.c
index 3a91221c45..8c72647fe1 100644
--- a/binutils/dlltool.c
+++ b/binutils/dlltool.c
@@ -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;