From 290c52bdbb037510879e2b87a44ba790540cae16 Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Sat, 30 Oct 2010 17:14:02 +0000 Subject: 2010-10-30 Kai Tietz * dlltool.c (scan_drectve_symbols): Allow quoted strings for -export directives. --- binutils/ChangeLog | 5 +++++ binutils/dlltool.c | 20 +++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) (limited to 'binutils') diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 8faa242..1640443 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2010-10-30 Kai Tietz + + * dlltool.c (scan_drectve_symbols): Allow quoted strings for -export + directives. + 2010-10-29 Joseph Myers * readelf.c (display_tic6x_attribute): Use Tag_ABI_compatibility 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; -- cgit v1.1