summaryrefslogtreecommitdiffhomepage
path: root/src/logic/pe_get_image_abi.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-11-14 23:24:09 -0500
committermidipix <writeonce@midipix.org>2016-11-14 23:31:16 -0500
commitb64d661dc38805d6ad5798be568fa8c41720df5c (patch)
tree30ca45e2dd3c6f596e8457b6384c82be7212b948 /src/logic/pe_get_image_abi.c
parent50a83023049b526a0c89165ee81cf7d9ed7eb5a2 (diff)
downloadperk-b64d661dc38805d6ad5798be568fa8c41720df5c.tar.bz2
perk-b64d661dc38805d6ad5798be568fa8c41720df5c.tar.xz
project: source tree layout: moved info source files under src/info.
Diffstat (limited to 'src/logic/pe_get_image_abi.c')
-rw-r--r--src/logic/pe_get_image_abi.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/logic/pe_get_image_abi.c b/src/logic/pe_get_image_abi.c
deleted file mode 100644
index 7219ba3..0000000
--- a/src/logic/pe_get_image_abi.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/***************************************************************/
-/* perk: PE Resource Kit */
-/* Copyright (C) 2015--2016 Z. Gilboa */
-/* Released under GPLv2 and GPLv3; see COPYING.PERK. */
-/***************************************************************/
-
-#include <string.h>
-
-#include <perk/perk.h>
-#include <perk/perk_meta.h>
-
-static const char const * pe_abi_str[PE_ABI_CAP] = {
- [PE_ABI_UNSUPPORTED] = "UNSUPPORTED",
- [PE_ABI_PE32] = "PE32",
- [PE_ABI_PE64] = "PE64",
-};
-
-int pe_get_image_abi(const struct pe_image_meta * m, struct pe_info_string * infostr)
-{
- int abi;
-
- switch (m->opt.std.magic) {
- case PE_MAGIC_PE32:
- abi = PE_ABI_PE32;
- break;
-
- case PE_MAGIC_PE32_PLUS:
- abi = PE_ABI_PE64;
- break;
-
- default:
- abi = PE_ABI_UNSUPPORTED;
- break;
- }
-
- if (infostr)
- strcpy(infostr->buffer,pe_abi_str[abi]);
-
- return abi;
-}