mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
GP-2748 added calling convention for elf entry point
This commit is contained in:
@@ -117,6 +117,24 @@
|
||||
</killedbycall>
|
||||
</prototype>
|
||||
</default_proto>
|
||||
<prototype name="processEntry" extrapop="0" stackshift="0">
|
||||
<input pointermax="4">
|
||||
<pentry minsize="1" maxsize="4">
|
||||
<register name="r0"/>
|
||||
</pentry>
|
||||
<pentry minsize="1" maxsize="500" align="4">
|
||||
<addr offset="0" space="stack"/>
|
||||
</pentry>
|
||||
</input>
|
||||
<output killedbycall="true">
|
||||
<pentry minsize="1" maxsize="4">
|
||||
<register name="r0"/>
|
||||
</pentry>
|
||||
</output>
|
||||
<unaffected>
|
||||
<register name="sp"/>
|
||||
</unaffected>
|
||||
</prototype>
|
||||
|
||||
<callfixup name="switch8_r3">
|
||||
<target name="switch8_r3"/>
|
||||
|
||||
@@ -84,5 +84,24 @@
|
||||
</localrange>
|
||||
</prototype>
|
||||
</default_proto>
|
||||
<prototype name="processEntry" extrapop="0" stackshift="0">
|
||||
<input pointermax="4">
|
||||
<pentry minsize="1" maxsize="4">
|
||||
<register name="v0"/>
|
||||
</pentry>
|
||||
<pentry minsize="1" maxsize="500" align="4">
|
||||
<addr offset="0" space="stack"/>
|
||||
</pentry>
|
||||
</input>
|
||||
<output killedbycall="true">
|
||||
<pentry minsize="1" maxsize="4">
|
||||
<register name="v0"/>
|
||||
</pentry>
|
||||
</output>
|
||||
<unaffected>
|
||||
<register name="sp"/>
|
||||
</unaffected>
|
||||
</prototype>
|
||||
|
||||
|
||||
</compiler_spec>
|
||||
|
||||
@@ -84,5 +84,23 @@
|
||||
</localrange>
|
||||
</prototype>
|
||||
</default_proto>
|
||||
<prototype name="processEntry" extrapop="0" stackshift="0">
|
||||
<input pointermax="4">
|
||||
<pentry minsize="1" maxsize="4">
|
||||
<register name="v0"/>
|
||||
</pentry>
|
||||
<pentry minsize="1" maxsize="500" align="4">
|
||||
<addr offset="0" space="stack"/>
|
||||
</pentry>
|
||||
</input>
|
||||
<output killedbycall="true">
|
||||
<pentry minsize="1" maxsize="4">
|
||||
<register name="v0"/>
|
||||
</pentry>
|
||||
</output>
|
||||
<unaffected>
|
||||
<register name="sp"/>
|
||||
</unaffected>
|
||||
</prototype>
|
||||
|
||||
</compiler_spec>
|
||||
|
||||
@@ -215,4 +215,28 @@
|
||||
<register name="R11"/>
|
||||
</killedbycall>
|
||||
</prototype>
|
||||
<prototype name="processEntry" extrapop="0" stackshift="0">
|
||||
<input pointermax="8">
|
||||
<pentry minsize="1" maxsize="8">
|
||||
<register name="RDX"/>
|
||||
</pentry>
|
||||
<pentry minsize="1" maxsize="500" align="8">
|
||||
<addr offset="0" space="stack"/>
|
||||
</pentry>
|
||||
</input>
|
||||
<output killedbycall="true">
|
||||
<pentry minsize="1" maxsize="8">
|
||||
<register name="RAX"/>
|
||||
</pentry>
|
||||
</output>
|
||||
<unaffected>
|
||||
<register name="RSP"/>
|
||||
</unaffected>
|
||||
<!-- Functions with this prototype don't have a return address. But, if we don't specify one, this prototype will
|
||||
use the default, which is to have the return address on the stack. That conflicts with how this prototype actually
|
||||
uses the stack, so we set a fake return address at a RBP, which is unspecified at process entry -->
|
||||
<returnaddress>
|
||||
<register name="RBP"/>
|
||||
</returnaddress>
|
||||
</prototype>
|
||||
</compiler_spec>
|
||||
|
||||
@@ -286,6 +286,31 @@
|
||||
<register name="EAX"/>
|
||||
</killedbycall>
|
||||
</prototype>
|
||||
<prototype name="processEntry" extrapop="0" stackshift="0">
|
||||
<input pointermax="4">
|
||||
<pentry minsize="1" maxsize="4">
|
||||
<register name="EDX"/>
|
||||
</pentry>
|
||||
<pentry minsize="1" maxsize="500" align="4">
|
||||
<addr offset="0" space="stack"/>
|
||||
</pentry>
|
||||
</input>
|
||||
<output killedbycall="true">
|
||||
<pentry minsize="1" maxsize="4">
|
||||
<register name="EAX"/>
|
||||
</pentry>
|
||||
</output>
|
||||
<unaffected>
|
||||
<register name="ESP"/>
|
||||
</unaffected>
|
||||
<!-- Functions with this prototype don't have a return address. But, if we don't specify one, this prototype will
|
||||
use the default, which is to have the return address on the stack. That conflicts with how this prototype actually
|
||||
uses the stack, so we set a fake return address at a EBP, which is unspecified at process entry -->
|
||||
<returnaddress>
|
||||
<register name="EBP"/>
|
||||
</returnaddress>
|
||||
</prototype>
|
||||
|
||||
|
||||
<resolveprototype name="__cdecl/__regparm">
|
||||
<model name="__cdecl"/> <!-- The default case -->
|
||||
|
||||
Reference in New Issue
Block a user