abi ¤
Classes:
-
ABI
–Encapsulates information about a calling convention.
-
SyscallABI
–The syscall ABI treats the syscall number as the zeroth argument,
-
SigreturnABI
–The sigreturn ABI is similar to the syscall ABI, except that
Attributes:
-
linux_i386
– -
linux_amd64
– -
linux_arm
– -
linux_aarch64
– -
linux_mips
– -
linux_mips64
– -
linux_ppc
– -
linux_ppc64
– -
linux_riscv32
– -
linux_riscv64
– -
linux_i386_syscall
– -
linux_amd64_syscall
– -
linux_arm_syscall
– -
linux_aarch64_syscall
– -
linux_mips_syscall
– -
linux_mips64_syscall
– -
linux_ppc_syscall
– -
linux_ppc64_syscall
– -
linux_riscv32_syscall
– -
linux_riscv64_syscall
– -
linux_i386_sigreturn
– -
linux_amd64_sigreturn
– -
linux_arm_sigreturn
– -
linux_i386_srop
– -
linux_amd64_srop
– -
linux_arm_srop
– -
DEFAULT_ABIS
(dict[tuple[int, str, str], ABI]
) – -
SYSCALL_ABIS
(dict[tuple[int, str, str], SyscallABI]
) – -
SIGRETURN_ABIS
(dict[tuple[int, str, str], SigreturnABI]
) –
linux_mips64 module-attribute
¤
linux_mips64 = ABI(
["$a0", "$a1", "$a2", "$a3", "$a4", "$a5", "$a6", "$a7"], 8, 0
)
linux_ppc module-attribute
¤
linux_ppc = ABI(['r3', 'r4', 'r5', 'r6', 'r7', 'r8', 'r9', 'r10'], 4, 0)
linux_ppc64 module-attribute
¤
linux_ppc64 = ABI(['r3', 'r4', 'r5', 'r6', 'r7', 'r8', 'r9', 'r10'], 8, 0)
linux_riscv32 module-attribute
¤
linux_riscv32 = ABI(['a0', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7'], 4, 0)
linux_riscv64 module-attribute
¤
linux_riscv64 = ABI(['a0', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7'], 8, 0)
linux_i386_syscall module-attribute
¤
linux_i386_syscall = SyscallABI(
["eax", "ebx", "ecx", "edx", "esi", "edi", "ebp"], 4, 0
)
linux_amd64_syscall module-attribute
¤
linux_amd64_syscall = SyscallABI(
["rax", "rdi", "rsi", "rdx", "r10", "r8", "r9"], 8, 0
)
linux_arm_syscall module-attribute
¤
linux_arm_syscall = SyscallABI(
["r7", "r0", "r1", "r2", "r3", "r4", "r5", "r6"], 4, 0
)
linux_aarch64_syscall module-attribute
¤
linux_aarch64_syscall = SyscallABI(
["x8", "x0", "x1", "x2", "x3", "x4", "x5"], 16, 0
)
linux_mips_syscall module-attribute
¤
linux_mips_syscall = SyscallABI(['$v0', '$a0', '$a1', '$a2', '$a3'], 4, 0)
linux_mips64_syscall module-attribute
¤
linux_mips64_syscall = SyscallABI(
["$v0", "$a0", "$a1", "$a2", "$a3", "$a4", "$a5"], 4, 0
)
linux_ppc_syscall module-attribute
¤
linux_ppc_syscall = SyscallABI(
["r0", "r3", "r4", "r5", "r6", "r7", "r8", "r9"], 4, 0
)
linux_ppc64_syscall module-attribute
¤
linux_ppc64_syscall = SyscallABI(
["r0", "r3", "r4", "r5", "r6", "r7", "r8"], 8, 0
)
linux_riscv32_syscall module-attribute
¤
linux_riscv32_syscall = SyscallABI(
["a7", "a0", "a1", "a2", "a3", "a4", "a5", "a6"], 4, 0
)
linux_riscv64_syscall module-attribute
¤
linux_riscv64_syscall = SyscallABI(
["a7", "a0", "a1", "a2", "a3", "a4", "a5", "a6"], 8, 0
)
DEFAULT_ABIS module-attribute
¤
DEFAULT_ABIS: dict[tuple[int, str, str], ABI] = {
(32, "i386", "linux"): linux_i386,
(64, "x86-64", "linux"): linux_amd64,
(64, "aarch64", "linux"): linux_aarch64,
(32, "arm", "linux"): linux_arm,
(32, "thumb", "linux"): linux_arm,
(32, "mips", "linux"): linux_mips,
(64, "mips", "linux"): linux_mips64,
(32, "powerpc", "linux"): linux_ppc,
(64, "powerpc", "linux"): linux_ppc64,
(32, "rv32", "linux"): linux_riscv32,
(64, "rv64", "linux"): linux_riscv64,
}
SYSCALL_ABIS module-attribute
¤
SYSCALL_ABIS: dict[tuple[int, str, str], SyscallABI] = {
(32, "i386", "linux"): linux_i386_syscall,
(64, "x86-64", "linux"): linux_amd64_syscall,
(64, "aarch64", "linux"): linux_aarch64_syscall,
(32, "arm", "linux"): linux_arm_syscall,
(32, "thumb", "linux"): linux_arm_syscall,
(32, "mips", "linux"): linux_mips_syscall,
(64, "mips", "linux"): linux_mips64_syscall,
(32, "powerpc", "linux"): linux_ppc_syscall,
(64, "powerpc", "linux"): linux_ppc64_syscall,
(32, "rv32", "linux"): linux_riscv32_syscall,
(64, "rv64", "linux"): linux_riscv64_syscall,
}
SIGRETURN_ABIS module-attribute
¤
SIGRETURN_ABIS: dict[tuple[int, str, str], SigreturnABI] = {
(32, "i386", "linux"): linux_i386_sigreturn,
(64, "x86-64", "linux"): linux_amd64_sigreturn,
(32, "arm", "linux"): linux_arm_sigreturn,
(32, "thumb", "linux"): linux_arm_sigreturn,
}
ABI ¤
Encapsulates information about a calling convention.
Attributes:
-
returns
– -
register_arguments
(list[str]
) – -
arg_alignment
– -
stack_minimum
–
SyscallABI ¤
Bases: ABI
The syscall ABI treats the syscall number as the zeroth argument, which must be loaded into the specified register.
Attributes:
-
syscall_register
– -
register_arguments
(list[str]
) – -
arg_alignment
– -
stack_minimum
– -
returns
–
SigreturnABI ¤
Bases: SyscallABI
The sigreturn ABI is similar to the syscall ABI, except that both PC and SP are loaded from the stack. Because of this, there is no 'return' slot necessary on the stack.
Attributes:
-
returns
– -
register_arguments
(list[str]
) – -
arg_alignment
– -
stack_minimum
– -
syscall_register
–