| 104 | bool FreeBSDPluginInit() |
| 105 | #else |
| 106 | BINARYNINJAPLUGIN bool CorePluginInit() |
| 107 | #endif |
| 108 | { |
| 109 | Ref<Architecture> x86 = Architecture::GetByName("x86"); |
| 110 | if (x86) |
| 111 | { |
| 112 | Ref<Platform> platform; |
| 113 | |
| 114 | platform = new FreeBSDX86Platform(x86); |
| 115 | Platform::Register("freebsd", platform); |
| 116 | BinaryViewType::RegisterPlatform("ELF", 9, platform); |
| 117 | } |
| 118 | |
| 119 | Ref<Architecture> x64 = Architecture::GetByName("x86_64"); |
| 120 | if (x64) |
| 121 | { |
| 122 | Ref<Platform> platform; |
| 123 | |
| 124 | platform = new FreeBSDX64Platform(x64); |
| 125 | Platform::Register("freebsd", platform); |
| 126 | BinaryViewType::RegisterPlatform("ELF", 9, platform); |
| 127 | } |
| 128 | |
| 129 | Ref<Architecture> armv7 = Architecture::GetByName("armv7"); |
| 130 | Ref<Architecture> thumb2 = Architecture::GetByName("thumb2"); |
| 131 | if (armv7 && thumb2) |
| 132 | { |
| 133 | Ref<Platform> armPlatform, thumbPlatform; |
| 134 | |
| 135 | armPlatform = new FreeBSDArmv7Platform(armv7, "freebsd-armv7"); |
| 136 | thumbPlatform = new FreeBSDArmv7Platform(thumb2, "freebsd-thumb2"); |
| 137 | armPlatform->AddRelatedPlatform(thumb2, thumbPlatform); |
| 138 | thumbPlatform->AddRelatedPlatform(armv7, armPlatform); |
| 139 | Platform::Register("freebsd", armPlatform); |
| 140 | Platform::Register("freebsd", thumbPlatform); |
| 141 | BinaryViewType::RegisterPlatform("ELF", 9, armPlatform); |
| 142 | } |
| 143 | |
| 144 | Ref<Architecture> arm64 = Architecture::GetByName("aarch64"); |
| 145 | if (arm64) |
| 146 | { |
| 147 | Ref<Platform> platform; |
| 148 | |
| 149 | platform = new FreeBSDArm64Platform(arm64); |
| 150 | Platform::Register("freebsd", platform); |
| 151 | BinaryViewType::RegisterPlatform("ELF", 9, platform); |
| 152 | } |
| 153 | |
| 154 | return true; |
| 155 | } |
| 156 | } |
nothing calls this directly
no test coverage detected