diff options
author | Kai Tietz <kai.tietz@onevision.com> | 2010-10-30 17:14:02 +0000 |
---|---|---|
committer | Kai Tietz <kai.tietz@onevision.com> | 2010-10-30 17:14:02 +0000 |
commit | 290c52bdbb037510879e2b87a44ba790540cae16 (patch) | |
tree | 067bbbdd41f29613e88845a64d272c56923cd7fa /binutils/dlltool.c | |
parent | 9eeee97773603ecd14f8cbdef2561cbeabd523fd (diff) | |
download | binutils-290c52bdbb037510879e2b87a44ba790540cae16.zip binutils-290c52bdbb037510879e2b87a44ba790540cae16.tar.gz binutils-290c52bdbb037510879e2b87a44ba790540cae16.tar.bz2 |
2010-10-30 Kai Tietz <kai.tietz@onevision.com>
* dlltool.c (scan_drectve_symbols): Allow quoted strings for -export
directives.
Diffstat (limited to 'binutils/dlltool.c')
-rw-r--r-- | binutils/dlltool.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/binutils/dlltool.c b/binutils/dlltool.c index 3a91221..8c72647 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; |