News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Polink

Started by JK, May 16, 2020, 01:27:36 AM

Previous topic - Next topic

zedd151

#30
Quote from: greenozon on October 06, 2022, 03:08:52 AMDoes anyone knows if there is a replacement of rc.exe (+rcdll.dll) by MS as it is crashing on my another testcase:
post your .rc file, maybe someone can help determine the cause for the crash better that way.
Also, is it the same version of rc.exe and rc.dll?


Even better, attach your entire project in a .zip file. This way other members may be able to see if a different rc.exe/rc.dll versions makes a difference. Possibly an error in the .rc file?

Vortex

Hi greenozon,

You can also try Pelle's resource compiler porc.exe :

E:\PellesC\Bin>porc.exe
Pelles Resource Compiler, Version 11.00.0
Copyright (c) Pelle Orinius 1997-2021


Dependencies :

E:\PellesC\Bin>podump.exe /IMPORTS porc.exe | findstr ".dll"
        KERNEL32.dll
        porc.dll

hutch--

Its usually the case that if you have an error in an RC script, RC.EXE will crash and leave a dead temp file in the directory where you are building the app. The solution is to fix any errors in the RC script. Also with RC.EXE, use the /v switch (verbose mode) as it can be useful in determining problems.

Pelle's tools work well and are always up to date, you can also try his resource compiler.

greenozon

Yet another question on polink.exe

Goal: I'd  like to generate debug info and benefit from it in either Ida or Ollydbg
what are my stept to reach the goal?
I'm using x64 bits env

I"ve tried the /DEBUG option to linker but it says

Writing debug information
POLINK: warning: Unrecognized version (241) of debug symbols in object 'tut_1.obj'; ignored.

Also when I tried to feed the generated .exe into Ida it doesn't see any debug symbols..

but it complains on another issue (not related I guess to the debug stuff)

---------------------------
Warning
---------------------------
The imports segment seems to be destroyed. This MAY mean that
the file was packed or otherwise modified in order to make it
more difficult to analyze. If you want to see the imports
segment in the original form, please reload it with the
'make imports section' checkbox cleared.
---------------------------
OK   
---------------------------


TimoVJL

polink 8 don't handle microsoft x64 debug format.
polink from 10 use own debug format.

Private PellesC x64 generated debug formats:
polink 8 PO64
polink 9 P10
polink 10 PO11
polink 11 PO11

May the source be with you

greenozon

Thanks for clarifications
what about another cmd line option of the linker:
/DEBUGTYPE

TimoVJL

From polink 11 help:
Quote/DEBUGTYPE option (POLINK)

Syntax:
/DEBUGTYPE:{PO | COFF | BOTH}

Description:
The /DEBUGTYPE option specifies the kind of debug information placed in the executable file. It can either be Pelles C information (/DEBUGTYPE:PO), COFF information (/DEBUGTYPE:COFF), or both (/DEBUGTYPE:BOTH).
As of version 9.00, for compatibility with previous versions, /DEBUGTYPE:CV will be accepted but mapped to /DEBUGTYPE:PO.

The Pelles C debug format is the preferred format, the COFF debug format is generic and easier to produce but contains much less information.
May the source be with you

greenozon

so by specifying cmd options
/DEBUG /DEBUGTYPE:COFF
some debug info was embedded into built executable
following tests shows that neither OllyDbg x64 nor x64dbg debggers were able to benefit from that debut info
the winner is IDA (7.7) - it was able to read the debug info and show symbols inside the assembly listing!