mirror of
https://github.com/capstone-engine/capstone.git
synced 2024-11-27 07:20:33 +00:00
make all module code static
This commit is contained in:
parent
31baeb570f
commit
abc02059e3
@ -8,7 +8,7 @@
|
||||
#include "AArch64InstPrinter.h"
|
||||
#include "mapping.h"
|
||||
|
||||
void init_arm64(cs_struct *ud)
|
||||
static void init_arm64(cs_struct *ud)
|
||||
{
|
||||
MCRegisterInfo *mri = malloc(sizeof(*mri));
|
||||
|
||||
@ -23,7 +23,7 @@ void init_arm64(cs_struct *ud)
|
||||
ud->post_printer = AArch64_post_printer;
|
||||
}
|
||||
|
||||
void __attribute__ ((constructor)) __init_arm64__()
|
||||
static void __attribute__ ((constructor)) __init_arm64__()
|
||||
{
|
||||
init_arch[CS_ARCH_ARM64] = init_arm64;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "ARMInstPrinter.h"
|
||||
#include "mapping.h"
|
||||
|
||||
void init_arm(cs_struct *ud)
|
||||
static void init_arm(cs_struct *ud)
|
||||
{
|
||||
MCRegisterInfo *mri = malloc(sizeof(*mri));
|
||||
|
||||
@ -27,7 +27,7 @@ void init_arm(cs_struct *ud)
|
||||
ud->disasm = ARM_getInstruction;
|
||||
}
|
||||
|
||||
cs_err option_arm(cs_struct *handle, cs_opt_type type, size_t value)
|
||||
static cs_err option_arm(cs_struct *handle, cs_opt_type type, size_t value)
|
||||
{
|
||||
if (type == CS_OPT_MODE) {
|
||||
if (value & CS_MODE_THUMB)
|
||||
@ -40,7 +40,7 @@ cs_err option_arm(cs_struct *handle, cs_opt_type type, size_t value)
|
||||
return CS_ERR_OK;
|
||||
}
|
||||
|
||||
void __attribute__ ((constructor)) __init_arm__()
|
||||
static void __attribute__ ((constructor)) __init_arm__()
|
||||
{
|
||||
init_arch[CS_ARCH_ARM] = init_arm;
|
||||
option_arch[CS_ARCH_ARM] = option_arm;
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "MipsInstPrinter.h"
|
||||
#include "mapping.h"
|
||||
|
||||
void init_mips(cs_struct *ud)
|
||||
static void init_mips(cs_struct *ud)
|
||||
{
|
||||
MCRegisterInfo *mri = malloc(sizeof(*mri));
|
||||
|
||||
@ -26,7 +26,7 @@ void init_mips(cs_struct *ud)
|
||||
ud->disasm = Mips64_getInstruction;
|
||||
}
|
||||
|
||||
cs_err option_mips(cs_struct *handle, cs_opt_type type, size_t value)
|
||||
static cs_err option_mips(cs_struct *handle, cs_opt_type type, size_t value)
|
||||
{
|
||||
if (type == CS_OPT_MODE) {
|
||||
if (value & CS_MODE_32)
|
||||
@ -39,7 +39,7 @@ cs_err option_mips(cs_struct *handle, cs_opt_type type, size_t value)
|
||||
return CS_ERR_OK;
|
||||
}
|
||||
|
||||
void __attribute__ ((constructor)) __init_mips__()
|
||||
static void __attribute__ ((constructor)) __init_mips__()
|
||||
{
|
||||
init_arch[CS_ARCH_MIPS] = init_mips;
|
||||
option_arch[CS_ARCH_MIPS] = option_mips;
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "X86InstPrinter.h"
|
||||
#include "mapping.h"
|
||||
|
||||
void init_x86(cs_struct *ud)
|
||||
static void init_x86(cs_struct *ud)
|
||||
{
|
||||
// by default, we use Intel syntax
|
||||
ud->printer = X86_Intel_printInst;
|
||||
@ -20,7 +20,7 @@ void init_x86(cs_struct *ud)
|
||||
ud->post_printer = X86_post_printer;
|
||||
}
|
||||
|
||||
cs_err option_x86(cs_struct *handle, cs_opt_type type, size_t value)
|
||||
static cs_err option_x86(cs_struct *handle, cs_opt_type type, size_t value)
|
||||
{
|
||||
if (type == CS_OPT_SYNTAX) {
|
||||
switch(value) {
|
||||
@ -41,7 +41,7 @@ cs_err option_x86(cs_struct *handle, cs_opt_type type, size_t value)
|
||||
return CS_ERR_OK;
|
||||
}
|
||||
|
||||
void __attribute__ ((constructor)) __init_x86__()
|
||||
static void __attribute__ ((constructor)) __init_x86__()
|
||||
{
|
||||
init_arch[CS_ARCH_X86] = init_x86;
|
||||
option_arch[CS_ARCH_X86] = option_x86;
|
||||
|
Loading…
Reference in New Issue
Block a user