MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / CorePluginInit

Function CorePluginInit

arch/x86/arch_x86.cpp:4816–4889  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4814 bool X86PluginInit()
4815#else
4816 BINARYNINJAPLUGIN bool CorePluginInit()
4817#endif
4818 {
4819 InitX86Settings();
4820
4821 // XED Setup
4822 xed_tables_init();
4823 X86CommonArchitecture::InitializeCachedTypes();
4824
4825 // Register the architectures in the global list of available architectures
4826 Architecture* x16 = new X16Architecture();
4827 Architecture::Register(x16);
4828
4829 Architecture* x86 = new X86Architecture();
4830 Architecture::Register(x86);
4831
4832 Architecture* x64 = new X64Architecture();
4833 Architecture::Register(x64);
4834
4835 // Register calling conventions
4836 Ref<CallingConvention> conv;
4837 conv = new X86CdeclCallingConvention(x86);
4838 x86->RegisterCallingConvention(conv);
4839 x86->SetDefaultCallingConvention(conv);
4840 x86->SetCdeclCallingConvention(conv);
4841 conv = new X86StdcallCallingConvention(x86);
4842 x86->RegisterCallingConvention(conv);
4843 x86->SetStdcallCallingConvention(conv);
4844 conv = new X86RegParmCallingConvention(x86);
4845 x86->RegisterCallingConvention(conv);
4846 conv = new X86FastcallCallingConvention(x86);
4847 x86->RegisterCallingConvention(conv);
4848 conv = new X86ThiscallCallingConvention(x86);
4849 x86->RegisterCallingConvention(conv);
4850 conv = new X86LinuxSystemCallConvention(x86);
4851 x86->RegisterCallingConvention(conv);
4852
4853 x86->RegisterRelocationHandler("Mach-O", new x86MachoRelocationHandler());
4854 x86->RegisterRelocationHandler("KCView", new x86MachoRelocationHandler());
4855 x86->RegisterRelocationHandler("ELF", new x86ElfRelocationHandler());
4856 x86->RegisterRelocationHandler("COFF", new CoffRelocationHandler());
4857 x86->RegisterRelocationHandler("PE", new PeRelocationHandler());
4858
4859 conv = new X64SystemVCallingConvention(x64);
4860 x64->RegisterCallingConvention(conv);
4861 x64->SetDefaultCallingConvention(conv);
4862 x64->SetCdeclCallingConvention(conv);
4863 x64->SetFastcallCallingConvention(conv);
4864 x64->SetStdcallCallingConvention(conv);
4865 conv = new X64WindowsCallingConvention(x64);
4866 x64->RegisterCallingConvention(conv);
4867 conv = new X64LinuxSystemCallConvention(x64);
4868 x64->RegisterCallingConvention(conv);
4869
4870 x64->RegisterRelocationHandler("Mach-O", new x64MachoRelocationHandler());
4871 x64->RegisterRelocationHandler("KCView", new x64MachoRelocationHandler());
4872 x64->RegisterRelocationHandler("ELF", new x64ElfRelocationHandler());
4873 x64->RegisterRelocationHandler("COFF", new CoffRelocationHandler());

Callers

nothing calls this directly

Tested by

no test coverage detected