Open bbtzzt opened 2 months ago
Hi @bbtzzt, first of all sorry for the late reply.
For your first problem, failing to reassemble a binary. It would be good if you can share the binary, so we can make sure to reproduce your problem. ARM64 is one of the less matures architectures in Ddisasm, so it's possible that there are easy fixes for those issues.
For your second problem, right now we only publish capstone-gt
and mcasm
packages for x64 architecture (these are not pure python, and so they are architecture dependent). Even if we are rewriting ARM64 binaries, we run our rewriting tools in x64 and cross-compile. Is it absolutely needed for you to run things in an ARM64?
If so, we might be able to start generating the corresponding wheels. In the meantime, you might want to try generating those yourself. You can find mc-asm here https://github.com/grammatech/mc-asm and our fork of capstone here https://github.com/GrammaTech/capstone/tree/v5
Hello,I tried to install and use ddisasm on arm. First, I found the arm64 dockerfile provided by this link:https://github.com/GrammaTech/ddisasm/issues/44 ,However, due to the update of dependency library and versions of ddisasm and gtirb-pprinter, this dockerfile needs to be updated. Finally, I successfully installed the following versions of ddisasm and gtirb-pprinter on Ubuhntu 20.04.The updated dockerfile is provided in the attachment. Dockerfile-aarch64.zip
Then I started rewriting the arm binary with ddisasm.I have practiced rewriting binary programs such as vim, nginx, redis and ls, but except vim, the remaining programs encountered some errors in the process of generating new binaries by gtirb-pprinter. I don't know the specific reasons for the errors, and I hope to get your reply.
In addition, I want to install gtirb-rewriting on arm, but I encounter the following prompts. However, I can't find the pip package suitable for capstone-gt and mcasm of arm, which makes it impossible for me to continue to perform the functions of GTIRB Stack Stamp based on python api provided by gtirb-rewriting.
root@0eba6fea14aa:/home/# pip3 install gtirb_rewriting Collecting gtirb_rewriting Using cached gtirb_rewriting-0.2.0-py3-none-any.whl.metadata (628 bytes) INFO: pip is looking at multiple versions of gtirb-rewriting to determine which version is compatible with other requirements. This could take a while. Using cached gtirb_rewriting-0.1.2-py3-none-any.whl.metadata (639 bytes) Using cached gtirb_rewriting-0.1.1-py3-none-any.whl.metadata (639 bytes) Using cached gtirb_rewriting-0.1.0-py3-none-any.whl.metadata (631 bytes) Using cached gtirb_rewriting-0.0.24-py3-none-any.whl.metadata (657 bytes) Using cached gtirb_rewriting-0.0.23-py3-none-any.whl.metadata (596 bytes) Using cached gtirb_rewriting-0.0.22-py3-none-any.whl.metadata (596 bytes) Using cached gtirb_rewriting-0.0.21-py3-none-any.whl.metadata (523 bytes) Requirement already satisfied: gtirb-capstone in /usr/local/lib/python3.8/dist-packages/gtirb_capstone-1.0.3.dev0-py3.8.egg (from gtirb_rewriting) (1.0.3.dev0) Collecting gtirb-functions (from gtirb_rewriting) Using cached gtirb_functions-1.0.9-py3-none-any.whl.metadata (1.3 kB) Requirement already satisfied: gtirb in /usr/local/lib/python3.8/dist-packages/gtirb-2.1.0-py3.8.egg (from gtirb_rewriting) (2.1.0) INFO: pip is still looking at multiple versions of gtirb-rewriting to determine which version is compatible with other requirements. This could take a while. Collecting gtirb_rewriting Using cached gtirb_rewriting-0.0.20-py3-none-any.whl.metadata (498 bytes) Using cached gtirb_rewriting-0.0.19-py3-none-any.whl.metadata (767 bytes) Using cached gtirb_rewriting-0.0.18-py3-none-any.whl.metadata (767 bytes) Using cached gtirb_rewriting-0.0.17-py3-none-any.whl.metadata (767 bytes) Using cached gtirb_rewriting-0.0.16-py3-none-any.whl.metadata (767 bytes) INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C. Using cached gtirb_rewriting-0.0.15-py3-none-any.whl.metadata (767 bytes) Using cached gtirb_rewriting-0.0.14-py3-none-any.whl.metadata (767 bytes) Using cached gtirb_rewriting-0.0.13-py3-none-any.whl.metadata (767 bytes) Using cached gtirb_rewriting-0.0.12-py3-none-any.whl.metadata (767 bytes) Using cached gtirb_rewriting-0.0.11-py3-none-any.whl.metadata (767 bytes) ERROR: Cannot install gtirb-rewriting==0.0.11, gtirb-rewriting==0.0.12, gtirb-rewriting==0.0.13, gtirb-rewriting==0.0.14, gtirb-rewriting==0.0.15, gtirb-rewriting==0.0.16, gtirb-rewriting==0.0.17, gtirb-rewriting==0.0.18, gtirb-rewriting==0.0.19, gtirb-rewriting==0.0.20, gtirb-rewriting==0.0.21, gtirb-rewriting==0.0.22, gtirb-rewriting==0.0.23, gtirb-rewriting==0.0.24, gtirb-rewriting==0.1.0, gtirb-rewriting==0.1.1, gtirb-rewriting==0.1.2 and gtirb-rewriting==0.2.0 because these package versions have conflicting dependencies.
The conflict is caused by: gtirb-rewriting 0.2.0 depends on capstone-gt gtirb-rewriting 0.1.2 depends on capstone-gt gtirb-rewriting 0.1.1 depends on capstone-gt gtirb-rewriting 0.1.0 depends on capstone-gt gtirb-rewriting 0.0.24 depends on capstone-gt gtirb-rewriting 0.0.23 depends on capstone-gt gtirb-rewriting 0.0.22 depends on capstone-gt gtirb-rewriting 0.0.21 depends on mcasm>0.1.2 gtirb-rewriting 0.0.20 depends on mcasm>0.1.2 gtirb-rewriting 0.0.19 depends on mcasm gtirb-rewriting 0.0.18 depends on mcasm gtirb-rewriting 0.0.17 depends on mcasm gtirb-rewriting 0.0.16 depends on mcasm gtirb-rewriting 0.0.15 depends on mcasm gtirb-rewriting 0.0.14 depends on mcasm gtirb-rewriting 0.0.13 depends on mcasm gtirb-rewriting 0.0.12 depends on mcasm gtirb-rewriting 0.0.11 depends on mcasm
To fix this you could try to:
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts