You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Ran on Ubuntu 18.04, and also ran the test on Windows 11)
After running any PE binary (32 or 64 bit) through ddisasm, and getting the resulting .gtirb, I go to use gtirb-pprinter to reassemble the .exe but always get the same error: "lib.exe: command not found". Additionally I also get "ml64.exe: command not found". Is this a related issue?
How do I fix this?
The text was updated successfully, but these errors were encountered:
Hi @mattr555-r, gtirb-pprinter generates new binaries by generating an assembly file and then calling an off-the-self assembler and linker to produce a new binary.
For ELF files, it will use gcc by default to produce a new binary.
For PE file, it will call ml64.exe to produce a new binary. lib.exe is used to produce auxiliary .lib files necessary for reassembly.
Both ml64.exe and lib.exe are part of MS Visual Studio, so if you want to reassemble a PE file you need Visual Studio installed and in your path so gtirb-pprinter can find it. This should be easy to do in Windows.
This will fail to generate a binary, but it will generate an assembly file ex.asm and it will call llvm-dlltool to generate lib files from .def files. E.g. you should see something like this as part of the output:
lib.exe: command not found
Execute: llvm-dlltool -d /tmp/filepdUZl8.def -l KERNEL32.lib -m i386:x86-64
Then you can use uasm to generate a new object file:
The arguments to the linker will vary depending on your program, but you can see the (failed) call to ml64 in the pprinter output and use that as a starting point. E.g. all lib files generated with llvm-dlltool should be passed to mingw.
(Ran on Ubuntu 18.04, and also ran the test on Windows 11)
After running any PE binary (32 or 64 bit) through ddisasm, and getting the resulting .gtirb, I go to use gtirb-pprinter to reassemble the .exe but always get the same error: "lib.exe: command not found". Additionally I also get "ml64.exe: command not found". Is this a related issue?
How do I fix this?
The text was updated successfully, but these errors were encountered: