"Function@2@4" will result in "Function" instead of "Function@2" when --kill-at is used I only had a quick look at the sources - when I see this correct strchr in dlltoold.c/xlate should be changed to strrchr.
(In reply to comment #0) > "Function@2@4" will result in "Function" instead of "Function@2" when --kill-at > is used > > I only had a quick look at the sources - when I see this correct strchr in > dlltoold.c/xlate should be changed to strrchr. Should be "Function@4@4" - and yes, changing the strchr to strrchr results in correct exports.
it should check if a number follows as well otherwise functions names like "??2@YAPAXI@Z" would be destroyed as well (like the ones in msvcrt.dll)
Created attachment 3677 [details] Use strrchr and check for a following digit.
Hi Christoph, Please could you try out the uploaded patch and let me know if it works for you. Cheers Nick
the patch works fine
I've tested the patch as well and it fixes a bug for us in ReactOS. So, would be great if someone could commit that to upstream binutils :-)
Subject: Bug 9766 CVSROOT: /cvs/src Module name: src Changes by: nickc@sourceware.org 2009-01-26 15:52:55 Modified files: binutils : ChangeLog dlltool.c Log message: PR 9766 * dlltool.c (xlate): When strip text after the @ sign, look for the last one not the first one. Patches: http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/binutils/ChangeLog.diff?cvsroot=src&r1=1.1413&r2=1.1414 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/binutils/dlltool.c.diff?cvsroot=src&r1=1.90&r2=1.91
Hi Christoph, I have checked the patch in along with this changelog entry. Cheers Nick binutils/ChangeLog 2009-01-26 Nick Clifton <nickc@redhat.com> PR 9766 * dlltool.c (xlate): When strip text after the @ sign, look for the last one not the first one.