Preamble
This is education project. It is made to allow studying computer science, computer architectures and debugging binary codes.
Problem
segfault in VCS R-2020.12-SP1
1 | Command line: ./simv |
Solution
Let’s get objdump
1 | $ objdump -D /eda/SYNOPSYS/vcs/R-2020.12-SP1/linux/lib/libvcsnew.so &> dump |
VIM allows to open big dump file. After opening find - SNPSle_207fb97ffa75eca3
1 | 019e273a <SNPSle_207fb97ffa75eca3>: |
We are interested in line - 19e2771: e8 b0 fd ff ff call 19e2526
It’s callq instruction which we can replace by some nop instructions.
Nop instruction is 0x90 in hex code.
First of all you must make backup of VCS tool!
Edit binary file via hexedit
1 | $ hexedit /eda/SYNOPSYS/vcs/R-2020.12-SP1/linux/lib/libvcsnew.so |
Find e8 b0 fd ff ff which is at 19e2771 address. And replace this bytes by 0x90! Save changes and close library.
So let’s check result via objdump:
1 | $ objdump -D /eda/SYNOPSYS/vcs/R-2020.12-SP1/linux/lib/libvcsnew.so &> new_dump |
1 | 019e273a <SNPSle_207fb97ffa75eca3>: |