BinaryAnalysisPlatform / bap

Binary Analysis Platform
MIT License
2.05k stars 271 forks source link

rewrites x86 abi using the new infrastructure #1505

Closed ivg closed 2 years ago

ivg commented 2 years ago

Rewrites all x86 and x86_64 ABI using the new infrastructure. The ABI comprise calling conventions and name demangling schemes. We now support (at various levels of detail) 12 ABI. The most popular ABI, such as cdecl, stdcall, ms, and sysv are quite complete, with sysv lacking only the ability to pass extra wide vectors (a feature that is rarely used in libraries).

The improved name demangling scheme now handles x86 and darwin files, so now we have a much better chance to be able to execute them.

This commit also includes slight extensions to the bap-c library, such as a new rebase operator in the calling convention DSL, an ability to reverse registers when a value is passed via several registers (x86 passes values in the reversed order) and the is_void predicate in the C.Type module.