[Tinycc-devel] (no subject)
DWORD64 WINAPI SymLoadModuleEx( __in HANDLE hProcess, __in HANDLE hFile, __in PCTSTR ImageName, __in PCTSTR ModuleName, __in DWORD64 BaseOfDll, __in DWORD DllSize, __in PMODLOAD_DATA Data, __in DWORD Flags ); ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
[Tinycc-devel] how to make symbol '_SymLoadModuleEx@36' match its defination of 8 argv
Hi there, Sorry for the previous incomplete email. I'm on windows, and used the dbghelp.dll's function SymLoadModuleEx and SymLoadModule64. The problem is that they will get 9 argv when compiled! You can debug to confirm. As dbghelp.chm says: DWORD64 WINAPI SymLoadModuleEx( __in HANDLE hProcess, __in HANDLE hFile, __in PCTSTR ImageName, __in PCTSTR ModuleName, __in DWORD64 BaseOfDll, __in DWORD DllSize, __in PMODLOAD_DATA Data, __in DWORD Flags ); DWORD64 WINAPI SymLoadModule64( __in HANDLE hProcess, __in HANDLE hFile, __in PCSTR ImageName, __in PCSTR ModuleName, __in DWORD64 BaseOfDll, __in DWORD SizeOfDll ); They both have the DWORD64 format argv. Can any body help? ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] how to make symbol '_SymLoadModuleEx@36' match its defination of 8 argv
Helo, 2014-04-05 21:54 GMT+08:00 lifenjoi...@163.com: Hi there, Sorry for the previous incomplete email. I'm on windows, and used the dbghelp.dll's function SymLoadModuleEx and SymLoadModule64. The problem is that they will get 9 argv when compiled! You can debug to confirm. Can you give a minimal sample code for this issue? As dbghelp.chm says: DWORD64 WINAPI SymLoadModuleEx( __in HANDLE hProcess, __in HANDLE hFile, __in PCTSTR ImageName, __in PCTSTR ModuleName, __in DWORD64 BaseOfDll, __in DWORD DllSize, __in PMODLOAD_DATA Data, __in DWORD Flags ); DWORD64 WINAPI SymLoadModule64( __in HANDLE hProcess, __in HANDLE hFile, __in PCSTR ImageName, __in PCSTR ModuleName, __in DWORD64 BaseOfDll, __in DWORD SizeOfDll ); They both have the DWORD64 format argv. Can any body help? ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] x86_64: shared libs
Hi, On Fri, 4 Apr 2014, Michael Matz wrote: Yes, that's something on my TODO. Theoretically having runtime_plt_and_got makes code emission a tiny bit faster because having a proper PLT and GOT also for -run means first creating and second applying intermediate relocations (the _GLOB_DAT and _JUMP_SLOT relocs), which is cut short with the hack. OTOH removing the hack would remove deviation depending on output type, so I think it's a good idea nevertheless. Done now. For x86_64 and ARM, where the latter required me to extend the current relocation support to some more cases. To test the latter I used gawk and mpfr, for which I had to add alloca support to ARM. So I'm reasonably sure that my changes don't cause regressions, but from reading the code there's still potential to fix more things (and of course to implement ARM shared libs). One of those days ... Ciao, Michael. ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel
[Tinycc-devel] 答复: 答复: how to make symbol '_SymLoadModuleEx@36' match its defination of 8 argv
Hi, I am a newbie. 发件人: lifenjoi...@163.com 发送时间: 2014年4月5日 22:54 dbghelp.def and shlwapi.def if needed. -ldbghelp -lshlwapi sal.h is usefull and neccessary for MS headers. Btw: I'll set my email format 1st. 发件人: Roy Tam [roy...@gmail.com] 发送时间: 2014年4月5日 22:17 Helo, 2014-04-05 21:54 GMT+08:00 lifenjoi...@163.com: Hi there, Sorry for the previous incomplete email. I'm on windows, and used the dbghelp.dll's function SymLoadModuleEx and SymLoadModule64. The problem is that they will get 9 argv when compiled! You can debug to confirm. Can you give a minimal sample code for this issue? As dbghelp.chm says: DWORD64 WINAPI SymLoadModuleEx( __in HANDLE hProcess, __in HANDLE hFile, __in PCTSTR ImageName, __in PCTSTR ModuleName, __in DWORD64 BaseOfDll, __in DWORD DllSize, __in PMODLOAD_DATA Data, __in DWORD Flags ); DWORD64 WINAPI SymLoadModule64( __in HANDLE hProcess, __in HANDLE hFile, __in PCSTR ImageName, __in PCSTR ModuleName, __in DWORD64 BaseOfDll, __in DWORD SizeOfDll ); They both have the DWORD64 format argv. EAX together with ECX or EDX make a DWORD64. Ollydbg, my debugger, recognized it as 2 argv. So they match? CPU Disasm Address Hex dump Command Comments 00401356 |. B9 MOV ECX,0 0040135B |. 51PUSH ECX ; /Arg9 = 0 0040135C |. B9 MOV ECX,0; | 00401361 |. 51PUSH ECX ; |Arg8 = 0 00401362 |. 8B8D D4FD MOV ECX,DWORD PTR SS:[LOCAL.139] ; | 00401368 |. 51PUSH ECX ; |Arg7 = [LOCAL.139] 00401369 |. 8985 D0FD MOV DWORD PTR SS:[LOCAL.140],EAX ; | 0040136F |. 8B8D F0FE MOV ECX,DWORD PTR SS:[LOCAL.68] ; | 00401375 |. 8B85 F4FE MOV EAX,DWORD PTR SS:[LOCAL.67] ; | 0040137B |. 50PUSH EAX ; |Arg6 = [LOCAL.67] 0040137C |. 51PUSH ECX ; |Arg5 = [LOCAL.68] 0040137D |. B8 MOV EAX,0; | 00401382 |. 50PUSH EAX ; |Arg4 = 0 00401383 |. 8B85 D0FD MOV EAX,DWORD PTR SS:[LOCAL.140] ; | 00401389 |. 8B00 MOV EAX,DWORD PTR DS:[EAX] ; | 0040138B |. 50PUSH EAX ; |Arg3 0040138C |. B8 MOV EAX,0; | 00401391 |. 50PUSH EAX ; |Arg2 = 0 00401392 |. 8B45 FC MOV EAX,DWORD PTR SS:[LOCAL.1] ; | 00401395 |. 50PUSH EAX ; |Arg1 = [LOCAL.1] 00401396 |. E8 CD02 CALL JMP.dbghelp.SymLoadModuleEx ; \dbghelp.SymLoadModuleEx 0040139B |. 8985 E8FE MOV DWORD PTR SS:[LOCAL.70],EAX 004013A1 |. 8995 ECFE MOV DWORD PTR SS:[LOCAL.69],EDX Can any body help? ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel