Skip to content

Commit

Permalink
Build rz_arch
Browse files Browse the repository at this point in the history
  • Loading branch information
wargio committed Jan 17, 2024
1 parent a4f9852 commit 9af714e
Show file tree
Hide file tree
Showing 290 changed files with 1,542 additions and 1,035 deletions.
3 changes: 1 addition & 2 deletions binrz/rizin/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ rizin_exe = executable('rizin', 'rizin.c',
rz_bin_dep,
rz_flag_dep,
rz_cons_dep,
rz_asm_dep,
rz_arch_dep,
rz_debug_dep,
rz_config_dep,
rz_bp_dep,
rz_reg_dep,
rz_syscall_dep,
rz_analysis_dep,
rz_parse_dep,
rz_egg_dep,
rz_search_dep,
Expand Down
3 changes: 1 addition & 2 deletions binrz/rz-diff/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ executable('rz-diff', 'rz-diff.c',
rz_cons_dep,
rz_core_dep,
rz_bin_dep,
rz_analysis_dep,
rz_asm_dep,
rz_arch_dep,
rz_hash_dep,
rz_config_dep
],
Expand Down
Empty file removed librz/arch/README.md
Empty file.
Empty file removed librz/arch/README2.md
Empty file.
8 changes: 5 additions & 3 deletions librz/arch/analysis.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-FileCopyrightText: 2009-2020 nibble <[email protected]>
// SPDX-License-Identifier: LGPL-3.0-only

#include <rz_analysis.h>
#include <rz_arch.h>
#include <rz_util.h>
#include <rz_list.h>
#include <rz_util/rz_path.h>
Expand All @@ -11,7 +11,7 @@

RZ_LIB_VERSION(rz_analysis);

static RzAnalysisPlugin *analysis_static_plugins[] = { RZ_ANALYSIS_STATIC_PLUGINS };
static RzArchPlugin *analysis_static_plugins[] = { RZ_ARCH_STATIC_PLUGINS };

/**
* \brief Returns the default size byte width of memory access operations.
Expand Down Expand Up @@ -130,7 +130,9 @@ RZ_API RzAnalysis *rz_analysis_new(void) {
analysis->plugins = rz_list_new();
if (analysis->plugins) {
for (i = 0; i < RZ_ARRAY_SIZE(analysis_static_plugins); i++) {
rz_analysis_plugin_add(analysis, analysis_static_plugins[i]);
if (analysis_static_plugins[i]->p_analysis) {
rz_analysis_plugin_add(analysis, analysis_static_plugins[i]->p_analysis);
}
}
}
analysis->ht_global_var = ht_pp_new(NULL, global_kv_free, NULL);
Expand Down
2 changes: 1 addition & 1 deletion librz/arch/arch/arm/arm_cs.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <rz_analysis.h>
#include <capstone/capstone.h>
#include "../../asm/arch/arm/aarch64_meta_macros.h"
#include "aarch64_meta_macros.h"

RZ_IPI int rz_arm_cs_analysis_op_32_esil(RzAnalysis *a, RzAnalysisOp *op, ut64 addr, const ut8 *buf, int len, csh *handle, cs_insn *insn, bool thumb);
RZ_IPI int rz_arm_cs_analysis_op_64_esil(RzAnalysis *a, RzAnalysisOp *op, ut64 addr, const ut8 *buf, int len, csh *handle, cs_insn *insn);
Expand Down
1 change: 1 addition & 0 deletions librz/arch/arch/arm/arm_it.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: LGPL-3.0-only

#ifndef RZ_ARM_IT_H
#define RZ_ARM_IT_H

/**
* \file
Expand Down
2 changes: 1 addition & 1 deletion librz/arch/arch/arm/asm-arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#define _INCLUDE_ARMASS_H_

#include <rz_types_base.h>
#include "../arch/arm/aarch64_meta_macros.h"
#include "aarch64_meta_macros.h"

int armass_assemble(const char *str, ut64 off, int thumb);

Expand Down
2 changes: 1 addition & 1 deletion librz/arch/arch/avr/avr_il.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define RZIL_ANALYSIS_AVR_H

#include <rz_analysis.h>
#include "../../../asm/arch/avr/disassembler.h"
#include "disassembler.h"

RZ_IPI bool rz_avr_il_opcode(RzAnalysis *analysis, RzAnalysisOp *op, ut64 pc, AVROp *aop, AVROp *next_op);
RZ_IPI RzAnalysisILConfig *rz_avr_il_config(RZ_NONNULL RzAnalysis *analysis);
Expand Down
2 changes: 0 additions & 2 deletions librz/arch/arch/gb/gbdis.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ static void gb_hardware_register_name(char *reg, ut8 offset) {
}
}

#ifndef GB_DIS_LEN_ONLY
static int gbDisass(RzAsmOp *op, const ut8 *buf, int len) {
int foo = gbOpLength(gb_op[buf[0]].type);
if (len < foo) {
Expand Down Expand Up @@ -180,4 +179,3 @@ static int gbDisass(RzAsmOp *op, const ut8 *buf, int len) {
rz_strbuf_set(&op->buf_asm, buf_asm);
return foo;
}
#endif
2 changes: 1 addition & 1 deletion librz/arch/arch/lh5801/lh5801.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* (system manual) as published by Günter Holtkötter GmbH.
*/

#include <rz_types.h>
#include <stdint.h>
#include <stdlib.h>
typedef uint8_t ut8;

/* Instruction classes. That's for example "add with carry". */
enum lh5801_insn_class {
Expand Down
2 changes: 1 addition & 1 deletion librz/arch/arch/luac/v53/arch_53.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <rz_types.h>
#include <rz_asm.h>
#include <stddef.h>
#include "librz/asm/arch/luac/lua_arch.h"
#include "../lua_arch.h"

/*===========================================================================
We assume that instructions are unsigned numbers.
Expand Down
2 changes: 1 addition & 1 deletion librz/arch/arch/luac/v54/arch_54.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <rz_types.h>
#include <rz_asm.h>
#include "librz/asm/arch/luac/lua_arch.h"
#include "../lua_arch.h"

/*===========================================================================
We assume that instructions are unsigned 32-bit integers.
Expand Down
Loading

0 comments on commit 9af714e

Please sign in to comment.