Ghidra is a software reverse engineering (SRE) framework
GP-0 added callfixup for get_pc_thunk.bp
ghidra1ebaaed7d536b
diff --git a/Ghidra/Processors/x86/data/languages/x86gcc.cspec b/Ghidra/Processors/x86/data/languages/x86gcc.cspecindex 99a4904ae5..0cda278b61 100644--- a/Ghidra/Processors/x86/data/languages/x86gcc.cspec+++ b/Ghidra/Processors/x86/data/languages/x86gcc.cspec@@ -331,6 +331,17 @@</pcode></callfixup>+ <callfixup name="get_pc_thunk.bp">+ <target name="__i686.get_pc_thunk.bp"/>+ <target name="__x86.get_pc_thunk.bp"/>+ <pcode>+ <body><![CDATA[+ EBP = * ESP;+ ESP = ESP + 4;+ ]]></body>+ </pcode>+ </callfixup>+<callfixup name="get_pc_thunk_bx"><target name="__i686.get_pc_thunk.bx"/><target name="__x86.get_pc_thunk.bx"/>@@ -376,69 +387,77 @@</callfixup><callfixup name="x86_return_thunk">- <target name="__x86_return_thunk"/>- <pcode>- <body><![CDATA[+ <target name="__x86_return_thunk"/>+ <pcode>+ <body><![CDATA[EIP = *:4 ESP;ESP = ESP + 4;return [EIP];- ]]></body>- </pcode>- </callfixup>- <callfixup name="fentry">- <target name="__fentry__"/>- <pcode>- <body><![CDATA[+ ]]></body>+ </pcode>+ </callfixup>++ <callfixup name="fentry">+ <target name="__fentry__"/>+ <pcode>+ <body><![CDATA[temp:1 = 0;- ]]></body>- </pcode>- </callfixup>- <callfixup name="mcount">- <target name="mcount"/>- <pcode>- <body><![CDATA[+ ]]></body>+ </pcode>+ </callfixup>++ <callfixup name="mcount">+ <target name="mcount"/>+ <pcode>+ <body><![CDATA[temp:1 = 0;- ]]></body>- </pcode>- </callfixup>- <callfixup name="x86_indirect_thunk_ebp">- <target name="__x86_indirect_thunk_ebp"/>- <pcode>- <body><![CDATA[+ ]]></body>+ </pcode>+ </callfixup>++ <callfixup name="x86_indirect_thunk_ebp">+ <target name="__x86_indirect_thunk_ebp"/>+ <pcode>+ <body><![CDATA[call [EBP];- ]]></body>- </pcode>- </callfixup>- <callfixup name="x86_indirect_thunk_eax">- <target name="__x86_indirect_thunk_eax"/>- <pcode>- <body><![CDATA[+ ]]></body>+ </pcode>+ </callfixup>++ <callfixup name="x86_indirect_thunk_eax">+ <target name="__x86_indirect_thunk_eax"/>+ <pcode>+ <body><![CDATA[call [EAX];- ]]></body>- </pcode>- </callfixup>- <callfixup name="x86_indirect_thunk_ebx">- <target name="__x86_indirect_thunk_ebx"/>- <pcode>- <body><![CDATA[+ ]]></body>+ </pcode>+ </callfixup>++ <callfixup name="x86_indirect_thunk_ebx">+ <target name="__x86_indirect_thunk_ebx"/>+ <pcode>+ <body><![CDATA[call [EBX];- ]]></body>- </pcode>- </callfixup>- <callfixup name="x86_indirect_thunk_ecx">- <target name="__x86_indirect_thunk_ecx"/>- <pcode>- <body><![CDATA[+ ]]></body>+ </pcode>+ </callfixup>++ <callfixup name="x86_indirect_thunk_ecx">+ <target name="__x86_indirect_thunk_ecx"/>+ <pcode>+ <body><![CDATA[call [ECX];- ]]></body>- </pcode>- </callfixup>- <callfixup name="x86_indirect_thunk_edx">- <target name="__x86_indirect_thunk_edx"/>- <pcode>- <body><![CDATA[+ ]]></body>+ </pcode>+ </callfixup>++ <callfixup name="x86_indirect_thunk_edx">+ <target name="__x86_indirect_thunk_edx"/>+ <pcode>+ <body><![CDATA[call [EDX];- ]]></body>- </pcode>- </callfixup>+ ]]></body>+ </pcode>+ </callfixup>+</compiler_spec>