summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lamoureux <andrew@vector35.com>2017-02-24 12:19:52 -0500
committerAndrew Lamoureux <andrew@vector35.com>2017-02-24 12:19:52 -0500
commit1fd2d812330225b6e75f44b779b8430e389b4d7a (patch)
treee045fd3b82c4c9e07c7066462a7d3c64a1b82875
parent57088dfd10ebbc5361e1493c034dec8ed6730bdc (diff)
llvmservices functions to core api header
-rw-r--r--binaryninjacore.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/binaryninjacore.h b/binaryninjacore.h
index 62889a4d..7ac2eb8b 100644
--- a/binaryninjacore.h
+++ b/binaryninjacore.h
@@ -63,6 +63,24 @@
#define BN_DEFAULT_MIN_STRING_LENGTH 4
#define BN_MAX_STRING_LENGTH 128
+#define LLVM_SVCS_CB_NOTE 0
+#define LLVM_SVCS_CB_WARNING 1
+#define LLVM_SVCS_CB_ERROR 2
+
+#define LLVM_SVCS_DIALECT_UNSPEC 0
+#define LLVM_SVCS_DIALECT_ATT 1
+#define LLVM_SVCS_DIALECT_INTEL 2
+
+#define LLVM_SVCS_CM_DEFAULT 0
+#define LLVM_SVCS_CM_SMALL 1
+#define LLVM_SVCS_CM_KERNEL 2
+#define LLVM_SVCS_CM_MEDIUM 3
+#define LLVM_SVCS_CM_LARGE 4
+
+#define LLVM_SVCS_RM_STATIC 0
+#define LLVM_SVCS_RM_PIC 1
+#define LLVM_SVCS_RM_DYNAMIC_NO_PIC 2
+
#ifdef __cplusplus
extern "C"
{
@@ -2338,6 +2356,15 @@ extern "C"
char*** outVarName,
size_t* outVarNameElements);
BINARYNINJACOREAPI void BNFreeDemangledName(char*** name, size_t nameElements);
+
+ // LLVM Services APIs
+ BINARYNINJACOREAPI void BNLlvmServicesInit(void);
+
+ BINARYNINJACOREAPI int BNLlvmServicesAssemble(const char *src, int dialect, const char *triplet,
+ int codeModel, int relocMode, char **outBytes, int *outBytesLen, char **err, int *errLen);
+
+ BINARYNINJACOREAPI int BNLlvmServicesAssembleFree(char *outBytes, char *err);
+
#ifdef __cplusplus
}
#endif