Skip to content

Commit

Permalink
Fixed plugin loading due missing symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
wargio committed Oct 7, 2022
1 parent 98cf9c4 commit 3843925
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
19 changes: 16 additions & 3 deletions src/plugin_analysis.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,21 @@ static int s7_analysis(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const
return op->size;
}

static int s7_archinfo(RzAnalysis *a, int q) {
return 2;
static int s7_archinfo(RzAnalysis *a, RzAnalysisInfoType q) {
switch (q) {
case RZ_ANALYSIS_ARCHINFO_MIN_OP_SIZE:
return 2;
case RZ_ANALYSIS_ARCHINFO_MAX_OP_SIZE:
return 6;
case RZ_ANALYSIS_ARCHINFO_TEXT_ALIGN:
/* fall-thru */
case RZ_ANALYSIS_ARCHINFO_DATA_ALIGN:
return 0;
case RZ_ANALYSIS_ARCHINFO_CAN_USE_POINTERS:
return true;
default:
return -1;
}
}

RzAnalysisPlugin rz_analysis_plugin_mc7 = {
Expand All @@ -38,7 +51,7 @@ RzAnalysisPlugin rz_analysis_plugin_mc7 = {
};

#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct radare_plugin = {
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_mc7,
.version = RZ_VERSION
Expand Down
2 changes: 1 addition & 1 deletion src/plugin_asm.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RzAsmPlugin rz_asm_plugin_simatic_mc7 = {
};

#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct radare_plugin = {
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ASM,
.data = &rz_asm_plugin_simatic_mc7,
.version = RZ_VERSION
Expand Down

0 comments on commit 3843925

Please sign in to comment.