gold/
[deliverable/binutils-gdb.git] / ld / pe-dll.c
index 76a1ce3d256523970c6c1b2e0ad7d7cd10c1c380..bd3195f41d772e487e96c7306c529532bbcbc35a 100644 (file)
@@ -782,14 +782,17 @@ process_def_file_and_drectve (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *
     {
       for (i = 0; i < NE; i++)
        {
-         if (strchr (pe_def_file->exports[i].name, '@'))
+         /* Check for fastcall/stdcall-decoration, but ignore
+            C++ mangled names.  */
+         if (pe_def_file->exports[i].name[0] != '?'
+             && strchr (pe_def_file->exports[i].name, '@'))
            {
              /* 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;
This page took 0.023276 seconds and 4 git commands to generate.