Index: pe-dll.c =================================================================== RCS file: /cvs/src/src/ld/pe-dll.c,v retrieving revision 1.133 diff -u -r1.133 pe-dll.c --- pe-dll.c 27 Jun 2010 04:07:54 -0000 1.133 +++ pe-dll.c 29 Dec 2010 20:18:01 -0000 @@ -773,14 +773,16 @@ { for (i = 0; i < NE; i++) { - if (strchr (pe_def_file->exports[i].name, '@')) + /* Check for stdcall/fastcall decoration, ignore C++ mangled names */ + if (strchr (pe_def_file->exports[i].name, '@') && + pe_def_file->exports[i].name[0] != '?') { /* This will preserve internal_name, which may have been pointing to the same memory as name, or might not have. */ int lead_at = (*pe_def_file->exports[i].name == '@'); char *tmp = xstrdup (pe_def_file->exports[i].name + lead_at); - char *tmp_at = strchr (tmp, '@'); + char *tmp_at = strrchr (tmp, '@'); if (tmp_at) *tmp_at = 0;