Am 30.12.2010 12:21, Colin Finck wrote:
Wouldn't it have been easier to just provide a similar patch for LD then? It was a matter of changing a strchr() call to strrchr()... (http://sourceware.org/bugzilla/show_bug.cgi?id=9766)

I have attached a patch, but I was too lazy so far to compile and test it.

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;

_______________________________________________
Ros-dev mailing list
[email protected]
http://www.reactos.org/mailman/listinfo/ros-dev

Reply via email to