diff --git a/.github/labeler.yml b/.github/labeler.yml index bfa31b5899..7495640461 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -83,9 +83,6 @@ RLang: RMagic: - libr/magic/**/* -RParse: - - libr/parse/**/* - RReg: - libr/reg/**/* diff --git a/binr/blob/Makefile b/binr/blob/Makefile index 1807887131..16348c6abf 100644 --- a/binr/blob/Makefile +++ b/binr/blob/Makefile @@ -30,7 +30,6 @@ LDFLAGS+=-L../../libr/core -lr_core LDFLAGS+=-L../../libr/anal -lr_anal LDFLAGS+=-L../../libr/crypto -lr_crypto LDFLAGS+=-L../../libr/flag -lr_flag -LDFLAGS+=-L../../libr/parse -lr_parse LDFLAGS+=-L../../libr/fs -lr_fs LDFLAGS+=-L../../libr/magic -lr_magic LDFLAGS+=-L../../libr/syscall -lr_syscall diff --git a/binr/preload/Makefile b/binr/preload/Makefile index a37b3df584..7bb7c3841a 100644 --- a/binr/preload/Makefile +++ b/binr/preload/Makefile @@ -3,7 +3,7 @@ ISPPC=$(shell uname -m | grep Power) ifeq ($(ISPPC),) BIN=libr2 ISLIB=1 -BINDEPS=r_core r_parse r_search r_cons r_config +BINDEPS=r_core r_search r_cons r_config BINDEPS+=r_bin r_debug r_anal r_reg r_bp r_io BINDEPS+=r_lang r_asm r_syscall r_hash r_crypto BINDEPS+=r_magic r_socket r_flag r_util r_egg r_fs diff --git a/binr/rabin2/Makefile b/binr/rabin2/Makefile index e45c3ed0ef..4b2951abc4 100644 --- a/binr/rabin2/Makefile +++ b/binr/rabin2/Makefile @@ -1,7 +1,7 @@ BIN=rabin2 BINDEPS=r_magic r_core r_bin r_egg r_cons r_main BINDEPS+=r_config r_io r_flag r_asm r_util r_bp r_reg -BINDEPS+=r_debug r_lang r_anal r_parse r_crypto +BINDEPS+=r_debug r_lang r_anal r_crypto BINDEPS+=r_search r_syscall r_socket r_fs r_magic include ../rules.mk diff --git a/binr/rabin2/meson.build b/binr/rabin2/meson.build index ea3bd91727..48add675cb 100644 --- a/binr/rabin2/meson.build +++ b/binr/rabin2/meson.build @@ -19,7 +19,6 @@ executable('rabin2', 'rabin2.c', r_reg_dep, r_syscall_dep, r_anal_dep, - r_parse_dep, r_egg_dep, r_search_dep, r_crypto_dep, diff --git a/binr/radare2/Makefile b/binr/radare2/Makefile index 2758fe2fac..e53e3374a1 100644 --- a/binr/radare2/Makefile +++ b/binr/radare2/Makefile @@ -1,5 +1,5 @@ BIN=radare2 -BINDEPS=r_core r_parse r_search r_cons r_config +BINDEPS=r_core r_search r_cons r_config BINDEPS+=r_bin r_debug r_anal r_reg r_bp r_io r_fs BINDEPS+=r_lang r_asm r_syscall r_main r_util r_esil BINDEPS+=r_magic r_socket r_flag r_egg r_crypto diff --git a/binr/radare2/meson.build b/binr/radare2/meson.build index 9dea3ed5d0..de3a80bd4d 100644 --- a/binr/radare2/meson.build +++ b/binr/radare2/meson.build @@ -19,7 +19,6 @@ radare2_exe = executable('radare2', 'radare2.c', r_reg_dep, r_syscall_dep, r_anal_dep, - r_parse_dep, r_egg_dep, r_search_dep, r_crypto_dep, diff --git a/binr/radiff2/Makefile b/binr/radiff2/Makefile index a3a7e156a1..621d664288 100644 --- a/binr/radiff2/Makefile +++ b/binr/radiff2/Makefile @@ -2,8 +2,8 @@ BIN=radiff2 BINDEPS=r_core r_config r_cons r_search r_anal BINDEPS+=r_bin r_debug r_io r_asm r_fs r_crypto -BINDEPS+=r_socket r_flag r_lang r_reg r_bp r_parse -BINDEPS+=r_syscall r_magic r_util r_parse r_egg r_main +BINDEPS+=r_socket r_flag r_lang r_reg r_bp +BINDEPS+=r_syscall r_magic r_util r_egg r_main include ../rules.mk diff --git a/binr/rafind2/Makefile b/binr/rafind2/Makefile index 2146f6e6b4..e5660a0189 100644 --- a/binr/rafind2/Makefile +++ b/binr/rafind2/Makefile @@ -1,7 +1,7 @@ BIN=rafind2 BINDEPS=r_search r_io r_asm r_anal r_reg r_cons r_lang r_crypto -BINDEPS+=r_socket r_parse r_util r_syscall r_flag r_main +BINDEPS+=r_socket r_util r_syscall r_flag r_main include ../rules.mk diff --git a/binr/ragg2/Makefile b/binr/ragg2/Makefile index 5f4e39b409..866b7920f9 100644 --- a/binr/ragg2/Makefile +++ b/binr/ragg2/Makefile @@ -1,7 +1,7 @@ BIN=ragg2 BINDEPS=r_egg r_syscall r_asm BINDEPS+=r_core r_debug r_fs r_config r_bp r_crypto r_cons -BINDEPS+=r_lang r_parse r_anal r_reg r_flag r_crypto +BINDEPS+=r_lang r_anal r_reg r_flag r_crypto BINDEPS+=r_bin r_search r_io r_socket BINDEPS+=r_magic r_util r_main diff --git a/binr/rules.mk b/binr/rules.mk index 17dbf4d169..96b631e87b 100644 --- a/binr/rules.mk +++ b/binr/rules.mk @@ -52,7 +52,6 @@ LINK+=$(LIBR)/flag/libr_flag.a LINK+=$(LIBR)/syscall/libr_syscall.a LINK+=$(LIBR)/egg/libr_egg.a LINK+=$(LIBR)/fs/libr_fs.a -LINK+=$(LIBR)/parse/libr_parse.a LINK+=$(LIBR)/bin/libr_bin.a LINK+=$(LIBR)/asm/libr_asm.a LINK+=$(LIBR)/search/libr_search.a diff --git a/configure b/configure index 7cc291182f..e5f6baa89e 100755 --- a/configure +++ b/configure @@ -856,7 +856,7 @@ for A in ${ENVWORDS} ; do SEDFLAGS="${SEDFLAGS}s,@${A}@,${VAR},g;" done SEDFLAGS="${SEDFLAGS}'" -for A in ./config-user.mk libr/include/r_userconf.h pkgcfg/r_io.pc pkgcfg/r_magic.pc pkgcfg/r_esil.pc pkgcfg/r_asm.pc pkgcfg/r_bin.pc pkgcfg/r_anal.pc pkgcfg/r_arch.pc pkgcfg/r_cons.pc pkgcfg/r_core.pc pkgcfg/r_lang.pc pkgcfg/r_socket.pc pkgcfg/r_debug.pc pkgcfg/r_reg.pc pkgcfg/r_config.pc pkgcfg/r_flag.pc pkgcfg/r_syscall.pc pkgcfg/r_util.pc pkgcfg/r_search.pc pkgcfg/r_bp.pc pkgcfg/r_parse.pc pkgcfg/r_fs.pc pkgcfg/r_egg.pc pkgcfg/r_crypto.pc ; do # SUBDIRS +for A in ./config-user.mk libr/include/r_userconf.h pkgcfg/r_io.pc pkgcfg/r_magic.pc pkgcfg/r_esil.pc pkgcfg/r_asm.pc pkgcfg/r_bin.pc pkgcfg/r_anal.pc pkgcfg/r_arch.pc pkgcfg/r_cons.pc pkgcfg/r_core.pc pkgcfg/r_lang.pc pkgcfg/r_socket.pc pkgcfg/r_debug.pc pkgcfg/r_reg.pc pkgcfg/r_config.pc pkgcfg/r_flag.pc pkgcfg/r_syscall.pc pkgcfg/r_util.pc pkgcfg/r_search.pc pkgcfg/r_bp.pc pkgcfg/r_fs.pc pkgcfg/r_egg.pc pkgcfg/r_crypto.pc ; do # SUBDIRS if [ -f "${VPATH}/${A}.acr" ]; then SD_TARGET=${A} else diff --git a/configure.acr b/configure.acr index 68a640232b..76510ea63b 100644 --- a/configure.acr +++ b/configure.acr @@ -294,7 +294,6 @@ SUBDIRS ./config-user.mk pkgcfg/r_util.pc pkgcfg/r_search.pc pkgcfg/r_bp.pc - pkgcfg/r_parse.pc pkgcfg/r_fs.pc pkgcfg/r_egg.pc pkgcfg/r_crypto.pc diff --git a/dist/npm/package.json b/dist/npm/package.json index 3454273dcb..4438663255 100644 --- a/dist/npm/package.json +++ b/dist/npm/package.json @@ -25,7 +25,7 @@ "pancake " ], "name": "radare2-git", - "version": "5.7.8", + "version": "5.7.9", "bugs": { "url": "https://github.com/radareorg/radare2/issues" }, diff --git a/dist/plugins-cfg/plugins.wasi.cfg b/dist/plugins-cfg/plugins.wasi.cfg index 2e4d4c58c7..859dd7c540 100644 --- a/dist/plugins-cfg/plugins.wasi.cfg +++ b/dist/plugins-cfg/plugins.wasi.cfg @@ -1,7 +1,6 @@ STATIC=" arch.x86_nz arch.arm -asm.null anal.dalvik anal.wasm anal.pyc diff --git a/libr/anal/Makefile b/libr/anal/Makefile index 6a8275bf2d..a83b536e32 100644 --- a/libr/anal/Makefile +++ b/libr/anal/Makefile @@ -4,7 +4,7 @@ EXTRA_TARGETS+=do EXTRA_CLEAN=doclean NAME=r_anal -R2DEPS=r_util r_reg r_syscall r_search r_cons r_flag r_crypto r_parse r_arch r_esil +R2DEPS=r_util r_reg r_syscall r_search r_cons r_flag r_crypto r_arch r_esil CFLAGS:=-I.. -I$(LTOP)/asm/arch/include -DR2_PLUGIN_INCORE -Iarch -I$(TOP)/shlr $(CFLAGS) LDFLAGS+=${BN_LIBS} diff --git a/libr/anal/meson.build b/libr/anal/meson.build index 7868645504..fcac6718f5 100644 --- a/libr/anal/meson.build +++ b/libr/anal/meson.build @@ -239,7 +239,6 @@ r_anal = library('r_anal', r_anal_sources, r_crypto_dep, r_search_dep, r_cons_dep, - r_parse_dep, r_syscall_dep, r_flag_dep, java_dep, @@ -267,7 +266,6 @@ r_anal_static = static_library('r_anal_static', r_anal_sources, r_crypto_static_dep, r_esil_static_dep, r_flag_static_dep, - r_parse_static_dep, r_reg_static_dep, r_search_static_dep, r_syscall_static_dep, @@ -292,7 +290,6 @@ pkgconfig_mod.generate(r_anal, 'r_reg', 'r_asm', 'r_crypto', - 'r_parse', 'r_syscall', 'r_arch', 'r_search', diff --git a/libr/parse/p/parse_arm_pseudo.c b/libr/arch/p/arm/pseudo.c similarity index 100% rename from libr/parse/p/parse_arm_pseudo.c rename to libr/arch/p/arm/pseudo.c diff --git a/libr/parse/p/parse_6502_pseudo.c b/libr/arch/p/pseudo/6502_pseudo.c similarity index 100% rename from libr/parse/p/parse_6502_pseudo.c rename to libr/arch/p/pseudo/6502_pseudo.c diff --git a/libr/parse/p/parse_att2intel.c b/libr/arch/p/pseudo/att2intel.c similarity index 100% rename from libr/parse/p/parse_att2intel.c rename to libr/arch/p/pseudo/att2intel.c diff --git a/libr/parse/p/parse_avr_pseudo.c b/libr/arch/p/pseudo/avr_pseudo.c similarity index 100% rename from libr/parse/p/parse_avr_pseudo.c rename to libr/arch/p/pseudo/avr_pseudo.c diff --git a/libr/parse/p/parse_bpf_pseudo.c b/libr/arch/p/pseudo/bpf_pseudo.c similarity index 100% rename from libr/parse/p/parse_bpf_pseudo.c rename to libr/arch/p/pseudo/bpf_pseudo.c diff --git a/libr/parse/p/parse_chip8_pseudo.c b/libr/arch/p/pseudo/chip8_pseudo.c similarity index 100% rename from libr/parse/p/parse_chip8_pseudo.c rename to libr/arch/p/pseudo/chip8_pseudo.c diff --git a/libr/parse/p/parse_dalvik_pseudo.c b/libr/arch/p/pseudo/dalvik_pseudo.c similarity index 100% rename from libr/parse/p/parse_dalvik_pseudo.c rename to libr/arch/p/pseudo/dalvik_pseudo.c diff --git a/libr/parse/p/parse_evm_pseudo.c b/libr/arch/p/pseudo/evm_pseudo.c similarity index 100% rename from libr/parse/p/parse_evm_pseudo.c rename to libr/arch/p/pseudo/evm_pseudo.c diff --git a/libr/parse/p/parse_m68k_pseudo.c b/libr/arch/p/pseudo/m68k_pseudo.c similarity index 100% rename from libr/parse/p/parse_m68k_pseudo.c rename to libr/arch/p/pseudo/m68k_pseudo.c diff --git a/libr/parse/p/parse_mips_pseudo.c b/libr/arch/p/pseudo/mips_pseudo.c similarity index 100% rename from libr/parse/p/parse_mips_pseudo.c rename to libr/arch/p/pseudo/mips_pseudo.c diff --git a/libr/parse/p/parse_ppc_pseudo.c b/libr/arch/p/pseudo/ppc_pseudo.c similarity index 100% rename from libr/parse/p/parse_ppc_pseudo.c rename to libr/arch/p/pseudo/ppc_pseudo.c diff --git a/libr/parse/p/parse_riscv_pseudo.c b/libr/arch/p/pseudo/riscv_pseudo.c similarity index 100% rename from libr/parse/p/parse_riscv_pseudo.c rename to libr/arch/p/pseudo/riscv_pseudo.c diff --git a/libr/parse/p/parse_sh_pseudo.c b/libr/arch/p/pseudo/sh_pseudo.c similarity index 100% rename from libr/parse/p/parse_sh_pseudo.c rename to libr/arch/p/pseudo/sh_pseudo.c diff --git a/libr/parse/p/parse_tms320_pseudo.c b/libr/arch/p/pseudo/tms320_pseudo.c similarity index 100% rename from libr/parse/p/parse_tms320_pseudo.c rename to libr/arch/p/pseudo/tms320_pseudo.c diff --git a/libr/parse/p/parse_v850_pseudo.c b/libr/arch/p/pseudo/v850_pseudo.c similarity index 100% rename from libr/parse/p/parse_v850_pseudo.c rename to libr/arch/p/pseudo/v850_pseudo.c diff --git a/libr/parse/p/parse_wasm_pseudo.c b/libr/arch/p/pseudo/wasm_pseudo.c similarity index 100% rename from libr/parse/p/parse_wasm_pseudo.c rename to libr/arch/p/pseudo/wasm_pseudo.c diff --git a/libr/parse/p/parse_z80_pseudo.c b/libr/arch/p/pseudo/z80_pseudo.c similarity index 100% rename from libr/parse/p/parse_z80_pseudo.c rename to libr/arch/p/pseudo/z80_pseudo.c diff --git a/libr/parse/p/parse_x86_pseudo.c b/libr/arch/p/x86_nz/pseudo.c similarity index 100% rename from libr/parse/p/parse_x86_pseudo.c rename to libr/arch/p/x86_nz/pseudo.c diff --git a/libr/asm/Makefile b/libr/asm/Makefile index c171010f85..f778ae019f 100644 --- a/libr/asm/Makefile +++ b/libr/asm/Makefile @@ -1,7 +1,7 @@ include ../../global.mk NAME=r_asm -R2DEPS=r_syscall r_lang r_util r_parse +R2DEPS=r_syscall r_lang r_util R2DEPS+=r_flag r_cons r_reg r_arch CFLAGS+=-DR2_PLUGIN_INCORE -Iarch/include -Iarch -I../../shlr CURDIR=p/ @@ -40,11 +40,15 @@ $(EXTRA_CLEAN): $(MAKE) -C p clean rm -f `find arch/| grep '\.o$$'` -include ${STATIC_ASM_PLUGINS} -STATIC_OBJS=$(subst ..,p/..,$(subst asm_,p/asm_,$(STATIC_OBJ))) -OBJS=${STATIC_OBJS} asm.o acode.o aop.o aplugs.o +# include ${STATIC_ASM_PLUGINS} +# STATIC_OBJS=$(subst ..,p/..,$(subst asm_,p/asm_,$(STATIC_OBJ))) + +include ${STATIC_PARSE_PLUGINS} +STATIC_OBJS=$(subst ..,p/..,$(subst parse_,p/parse_,$(STATIC_OBJ))) +OBJS=${STATIC_OBJS} asm.o acode.o aop.o aplugs.o filter.o parse.o OBJS+=${SHARED2_OBJ} + ifeq ($(HAVE_GPERF),1) OBJS+=d/6502.o OBJS+=d/8051.o diff --git a/libr/asm/asm.c b/libr/asm/asm.c index f873905386..c711d5d06f 100644 --- a/libr/asm/asm.c +++ b/libr/asm/asm.c @@ -18,7 +18,7 @@ static const char *directives[] = { ".else", ".set", ".get", NULL }; -static const RAsmPlugin * const asm_static_plugins[] = { R_ASM_STATIC_PLUGINS }; +static const RAsmPlugin * const asm_static_plugins[] = { NULL }; // asm plugins are deprecated /* pseudo.c - private api */ static int r_asm_pseudo_align(RAsmCode *acode, RAsmOp *op, const char *input) { diff --git a/libr/parse/filter.c b/libr/asm/filter.c similarity index 100% rename from libr/parse/filter.c rename to libr/asm/filter.c diff --git a/libr/asm/meson.build b/libr/asm/meson.build index cabf9e5871..ca7b8eee20 100644 --- a/libr/asm/meson.build +++ b/libr/asm/meson.build @@ -4,9 +4,27 @@ r_asm_sources = [ 'asm.c', 'aop.c', 'acode.c', + 'parse.c', + 'filter.c', 'aplugs.c', - 'p/asm_null.c', -# '../arch/p/arm/gnu/floatformat.c', + '../arch/p/pseudo/z80_pseudo.c', + '../arch/p/pseudo/wasm_pseudo.c', + '../arch/p/pseudo/v850_pseudo.c', + '../arch/p/pseudo/tms320_pseudo.c', + '../arch/p/pseudo/sh_pseudo.c', + '../arch/p/pseudo/riscv_pseudo.c', + '../arch/p/pseudo/ppc_pseudo.c', + '../arch/p/pseudo/mips_pseudo.c', + '../arch/p/pseudo/m68k_pseudo.c', + '../arch/p/pseudo/evm_pseudo.c', + '../arch/p/pseudo/dalvik_pseudo.c', + '../arch/p/pseudo/chip8_pseudo.c', + '../arch/p/pseudo/bpf_pseudo.c', + '../arch/p/pseudo/6502_pseudo.c', + '../arch/p/arm/pseudo.c', + '../arch/p/x86_nz/pseudo.c', + '../arch/p/pseudo/avr_pseudo.c', + '../arch/p/pseudo/att2intel.c', ] r_asm_inc = [ @@ -29,9 +47,9 @@ r_asm = library('r_asm', r_asm_sources, dependencies: [ r_util_dep, r_syscall_dep, - r_parse_dep, r_lang_dep, r_arch_dep, + r_reg_dep, r_flag_dep, r_socket_dep, capstone_dep, @@ -52,9 +70,9 @@ r_asm_static = static_library('r_asm_static', r_asm_sources, c_args: library_cflags, dependencies: [ r_util_static_dep, + r_reg_static_dep, r_arch_static_dep, r_syscall_static_dep, - r_parse_static_dep, r_lang_static_dep, r_flag_static_dep, r_socket_static_dep, @@ -79,8 +97,8 @@ pkgconfig_mod.generate(r_asm, requires: [ 'r_util', 'r_syscall', - 'r_parse', 'r_lang', + 'r_reg', 'r_flag', 'r_arch', 'r_socket' diff --git a/libr/parse/p/6502_pseudo.mk b/libr/asm/p/6502_pseudo.mk similarity index 90% rename from libr/parse/p/6502_pseudo.mk rename to libr/asm/p/6502_pseudo.mk index 80ae0bec9c..7b70b27604 100644 --- a/libr/parse/p/6502_pseudo.mk +++ b/libr/asm/p/6502_pseudo.mk @@ -1,4 +1,4 @@ -OBJ_6502PSEUDO+=parse_6502_pseudo.o +OBJ_6502PSEUDO+=$(LIBR)/arch/p/pseudo/6502_pseudo.o TARGET_6502PSEUDO=parse_6502_pseudo.${EXT_SO} STATIC_OBJ+=${OBJ_6502PSEUDO} diff --git a/libr/parse/p/arm_pseudo.mk b/libr/asm/p/arm_pseudo.mk similarity index 91% rename from libr/parse/p/arm_pseudo.mk rename to libr/asm/p/arm_pseudo.mk index 7624c9f6d2..d747255606 100644 --- a/libr/parse/p/arm_pseudo.mk +++ b/libr/asm/p/arm_pseudo.mk @@ -1,4 +1,4 @@ -OBJ_ARMPSEUDO+=parse_arm_pseudo.o +OBJ_ARMPSEUDO+=$(LIBR)/arch/p/arm/pseudo.o TARGET_ARMPSEUDO=parse_arm_pseudo.${EXT_SO} STATIC_OBJ+=${OBJ_ARMPSEUDO} diff --git a/libr/asm/p/asm_null.c b/libr/asm/p/asm_null.c deleted file mode 100644 index 22b9bd7a80..0000000000 --- a/libr/asm/p/asm_null.c +++ /dev/null @@ -1,23 +0,0 @@ -/* radare - LGPL - Copyright 2019-2022 - pancake */ - -#include - -RAsmPlugin r_asm_plugin_null = { - .name = "null", - .author = "pancake", - .version = "1.0.0", - .arch = "null", - .license = "MIT", - .bits = 8 | 16 | 32 | 64, - .endian = R_SYS_ENDIAN_NONE, - .desc = "no disassemble", - .assemble = NULL, -}; - -#ifndef R2_PLUGIN_INCORE -R_API RLibStruct radare_plugin = { - .type = R_LIB_TYPE_ASM, - .data = &r_asm_plugin_null, - .version = R2_VERSION -}; -#endif diff --git a/libr/parse/p/att2intel.mk b/libr/asm/p/att2intel.mk similarity index 86% rename from libr/parse/p/att2intel.mk rename to libr/asm/p/att2intel.mk index b9dcaaa8c2..3adc39b75e 100644 --- a/libr/parse/p/att2intel.mk +++ b/libr/asm/p/att2intel.mk @@ -1,4 +1,4 @@ -OBJ_ATTINTEL+=parse_att2intel.o +OBJ_ATTINTEL+=$(LIBR)/arch/p/pseudo/att2intel.o TARGET_ATTINTEL=parse_att2intel.${EXT_SO} STATIC_OBJ+=${OBJ_ATTINTEL} diff --git a/libr/parse/p/avr_pseudo.mk b/libr/asm/p/avr_pseudo.mk similarity index 90% rename from libr/parse/p/avr_pseudo.mk rename to libr/asm/p/avr_pseudo.mk index fed23a9f2a..7a3aa9fd2c 100644 --- a/libr/parse/p/avr_pseudo.mk +++ b/libr/asm/p/avr_pseudo.mk @@ -1,4 +1,4 @@ -OBJ_AVRPSEUDO+=parse_avr_pseudo.o +OBJ_AVRPSEUDO+=$(LIBR)/arch/p/pseudo/avr_pseudo.o TARGET_AVRPSEUDO=parse_avr_pseudo.${EXT_SO} ALL_TARGETS+=${TARGET_AVRPSEUDO} diff --git a/libr/parse/p/bpf_pseudo.mk b/libr/asm/p/bpf_pseudo.mk similarity index 90% rename from libr/parse/p/bpf_pseudo.mk rename to libr/asm/p/bpf_pseudo.mk index 19a4b6c190..d4d9f1693e 100644 --- a/libr/parse/p/bpf_pseudo.mk +++ b/libr/asm/p/bpf_pseudo.mk @@ -1,4 +1,4 @@ -OBJ_BPF_PSEUDO+=parse_bpf_pseudo.o +OBJ_BPF_PSEUDO+=$(LIBR)/arch/p/pseudo/bpf_pseudo.o TARGET_BPF_PSEUDO=parse_bpf_pseudo.${EXT_SO} STATIC_OBJ+=${OBJ_BPF_PSEUDO} diff --git a/libr/parse/p/chip8_pseudo.mk b/libr/asm/p/chip8_pseudo.mk similarity index 89% rename from libr/parse/p/chip8_pseudo.mk rename to libr/asm/p/chip8_pseudo.mk index cc579a0d43..9f65d6b134 100644 --- a/libr/parse/p/chip8_pseudo.mk +++ b/libr/asm/p/chip8_pseudo.mk @@ -1,4 +1,4 @@ -OBJ_CHIP8PSEUDO+=parse_chip8_pseudo.o +OBJ_CHIP8PSEUDO+=$(LIBR)/arch/p/pseudo/chip8_pseudo.o TARGET_CHIP8PSEUDO=parse_chip8_pseudo.${EXT_SO} STATIC_OBJ+=${OBJ_CHIP8PSEUDO} diff --git a/libr/parse/p/dalvik_pseudo.mk b/libr/asm/p/dalvik_pseudo.mk similarity index 84% rename from libr/parse/p/dalvik_pseudo.mk rename to libr/asm/p/dalvik_pseudo.mk index 877005366e..34d28d8717 100644 --- a/libr/parse/p/dalvik_pseudo.mk +++ b/libr/asm/p/dalvik_pseudo.mk @@ -1,4 +1,4 @@ -OBJ_DALVIKPSEUDO+=parse_dalvik_pseudo.o +OBJ_DALVIKPSEUDO+=$(LIBR)/arch/p/pseudo/dalvik_pseudo.o TARGET_DALVIKPSEUDO=parse_dalvik_pseudo.${EXT_SO} ALL_TARGETS+=${TARGET_DALVIKPSEUDO} diff --git a/libr/parse/p/evm_pseudo.mk b/libr/asm/p/evm_pseudo.mk similarity index 90% rename from libr/parse/p/evm_pseudo.mk rename to libr/asm/p/evm_pseudo.mk index 55113896a0..39b4e9cd26 100644 --- a/libr/parse/p/evm_pseudo.mk +++ b/libr/asm/p/evm_pseudo.mk @@ -1,4 +1,4 @@ -OBJ_EVM_PSEUDO+=parse_evm_pseudo.o +OBJ_EVM_PSEUDO+=$(LIBR)/arch/p/pseudo/evm_pseudo.o TARGET_EVM_PSEUDO=parse_evm_pseudo.${EXT_SO} STATIC_OBJ+=${OBJ_EVM_PSEUDO} diff --git a/libr/parse/p/m68k_pseudo.mk b/libr/asm/p/m68k_pseudo.mk similarity index 90% rename from libr/parse/p/m68k_pseudo.mk rename to libr/asm/p/m68k_pseudo.mk index e5fd5c14e9..f3667c63c3 100644 --- a/libr/parse/p/m68k_pseudo.mk +++ b/libr/asm/p/m68k_pseudo.mk @@ -1,4 +1,4 @@ -OBJ_M68KPSEUDO+=parse_m68k_pseudo.o +OBJ_M68KPSEUDO+=$(LIBR)/arch/p/pseudo/m68k_pseudo.o TARGET_M68KPSEUDO=parse_m68k_pseudo.${EXT_SO} ALL_TARGETS+=${TARGET_M68KPSEUDO} diff --git a/libr/parse/p/mips_pseudo.mk b/libr/asm/p/mips_pseudo.mk similarity index 89% rename from libr/parse/p/mips_pseudo.mk rename to libr/asm/p/mips_pseudo.mk index d3b3ab37c5..94846d5ec4 100644 --- a/libr/parse/p/mips_pseudo.mk +++ b/libr/asm/p/mips_pseudo.mk @@ -1,4 +1,4 @@ -OBJ_MIPSPSEUDO+=parse_mips_pseudo.o +OBJ_MIPSPSEUDO+=$(LIBR)/arch/p/pseudo/mips_pseudo.o TARGET_MIPSPSEUDO=parse_mips_pseudo.${EXT_SO} ALL_TARGETS+=${TARGET_MIPSPSEUDO} diff --git a/libr/asm/p/null.mk b/libr/asm/p/null.mk deleted file mode 100644 index 602b92e751..0000000000 --- a/libr/asm/p/null.mk +++ /dev/null @@ -1,10 +0,0 @@ -OBJ_NULL=asm_null.o - -TARGET_NULL=asm_null.${EXT_SO} -STATIC_OBJ+=${OBJ_NULL} - -ifeq ($(WITHPIC),1) -ALL_TARGETS+=${TARGET_NULL} -${TARGET_NULL}: ${OBJ_NULL} - ${CC} $(call libname,asm_null) ${LDFLAGS} ${CFLAGS} -o ${TARGET_NULL} ${OBJ_NULL} -endif diff --git a/libr/parse/p/ppc_pseudo.mk b/libr/asm/p/ppc_pseudo.mk similarity index 90% rename from libr/parse/p/ppc_pseudo.mk rename to libr/asm/p/ppc_pseudo.mk index be077d684b..b47221f354 100644 --- a/libr/parse/p/ppc_pseudo.mk +++ b/libr/asm/p/ppc_pseudo.mk @@ -1,4 +1,4 @@ -OBJ_PPCPSEUDO+=parse_ppc_pseudo.o +OBJ_PPCPSEUDO+=$(LIBR)/arch/p/pseudo/ppc_pseudo.o TARGET_PPCPSEUDO=parse_ppc_pseudo.${EXT_SO} ALL_TARGETS+=${TARGET_PPCPSEUDO} diff --git a/libr/parse/p/riscv_pseudo.mk b/libr/asm/p/riscv_pseudo.mk similarity index 79% rename from libr/parse/p/riscv_pseudo.mk rename to libr/asm/p/riscv_pseudo.mk index 1f84e0bff0..ced0352c2d 100644 --- a/libr/parse/p/riscv_pseudo.mk +++ b/libr/asm/p/riscv_pseudo.mk @@ -1,4 +1,5 @@ -OBJ_RISCVPSEUDO+=parse_riscv_pseudo.o +# OBJ_RISCVPSEUDO+=$(LIBR)/arch/p/riscv/pseudo.o +OBJ_RISCVPSEUDO+=$(LIBR)/arch/p/pseudo/riscv_pseudo.o TARGET_RISCVPSEUDO=parse_riscv_pseudo.${EXT_SO} ALL_TARGETS+=${TARGET_RISCVPSEUDO} diff --git a/libr/parse/p/sh_pseudo.mk b/libr/asm/p/sh_pseudo.mk similarity index 90% rename from libr/parse/p/sh_pseudo.mk rename to libr/asm/p/sh_pseudo.mk index 3afb170a8f..d00592451c 100644 --- a/libr/parse/p/sh_pseudo.mk +++ b/libr/asm/p/sh_pseudo.mk @@ -1,4 +1,4 @@ -OBJ_SHPSEUDO+=parse_sh_pseudo.o +OBJ_SHPSEUDO+=$(LIBR)/arch/p/pseudo/sh_pseudo.o TARGET_SHPSEUDO=parse_sh_pseudo.${EXT_SO} ALL_TARGETS+=${TARGET_SHPSEUDO} diff --git a/libr/parse/p/tms320_pseudo.mk b/libr/asm/p/tms320_pseudo.mk similarity index 87% rename from libr/parse/p/tms320_pseudo.mk rename to libr/asm/p/tms320_pseudo.mk index 3fb50b1bab..b8fa81f646 100644 --- a/libr/parse/p/tms320_pseudo.mk +++ b/libr/asm/p/tms320_pseudo.mk @@ -1,4 +1,4 @@ -OBJ_TMS320PSEUDO+=parse_tms320_pseudo.o +OBJ_TMS320PSEUDO+=$(LIBR)/arch/p/pseudo/tms320_pseudo.o TARGET_TMS320PSEUDO=parse_tms320_pseudo.${EXT_SO} ALL_TARGETS+=${TARGET_TMS320PSEUDO} diff --git a/libr/parse/p/v850_pseudo.mk b/libr/asm/p/v850_pseudo.mk similarity index 87% rename from libr/parse/p/v850_pseudo.mk rename to libr/asm/p/v850_pseudo.mk index 22b4a16bcb..66924982eb 100644 --- a/libr/parse/p/v850_pseudo.mk +++ b/libr/asm/p/v850_pseudo.mk @@ -1,4 +1,4 @@ -OBJ_V850PSEUDO+=parse_v850_pseudo.o +OBJ_V850PSEUDO+=$(LIBR)/arch/p/pseudo/v850_pseudo.o TARGET_V850PSEUDO=parse_v850_pseudo.${EXT_SO} ALL_TARGETS+=${TARGET_V850PSEUDO} diff --git a/libr/parse/p/wasm_pseudo.mk b/libr/asm/p/wasm_pseudo.mk similarity index 92% rename from libr/parse/p/wasm_pseudo.mk rename to libr/asm/p/wasm_pseudo.mk index 3ddf66badc..d4f1880d9f 100644 --- a/libr/parse/p/wasm_pseudo.mk +++ b/libr/asm/p/wasm_pseudo.mk @@ -1,4 +1,4 @@ -OBJ_WASMPSEUDO+=parse_wasm_pseudo.o +OBJ_WASMPSEUDO+=$(LIBR)/arch/p/pseudo/wasm_pseudo.o TARGET_WASMPSEUDO=parse_wasm_pseudo.${EXT_SO} STATIC_OBJ+=${OBJ_WASMPSEUDO} diff --git a/libr/parse/p/x86_pseudo.mk b/libr/asm/p/x86_pseudo.mk similarity index 92% rename from libr/parse/p/x86_pseudo.mk rename to libr/asm/p/x86_pseudo.mk index 16148e5797..46b2c3ded6 100644 --- a/libr/parse/p/x86_pseudo.mk +++ b/libr/asm/p/x86_pseudo.mk @@ -1,4 +1,4 @@ -OBJ_X86PSEUDO+=parse_x86_pseudo.o +OBJ_X86PSEUDO+=$(LIBR)/arch/p/x86_nz/pseudo.o TARGET_X86PSEUDO=parse_x86_pseudo.${EXT_SO} STATIC_OBJ+=${OBJ_X86PSEUDO} diff --git a/libr/parse/p/z80_pseudo.mk b/libr/asm/p/z80_pseudo.mk similarity index 90% rename from libr/parse/p/z80_pseudo.mk rename to libr/asm/p/z80_pseudo.mk index c72226f8e1..03281931d6 100644 --- a/libr/parse/p/z80_pseudo.mk +++ b/libr/asm/p/z80_pseudo.mk @@ -1,4 +1,4 @@ -OBJ_Z80PSEUDO+=parse_z80_pseudo.o +OBJ_Z80PSEUDO+=$(LIBR)/arch/p/pseudo/z80_pseudo.o TARGET_Z80PSEUDO=parse_z80_pseudo.${EXT_SO} STATIC_OBJ+=${OBJ_Z80PSEUDO} diff --git a/libr/parse/parse.c b/libr/asm/parse.c similarity index 100% rename from libr/parse/parse.c rename to libr/asm/parse.c diff --git a/libr/bin/p/bin_java.c b/libr/bin/p/bin_java.c index b4416eb3c7..d198cddcc9 100644 --- a/libr/bin/p/bin_java.c +++ b/libr/bin/p/bin_java.c @@ -1,11 +1,14 @@ /* radare - LGPL - Copyright 2009-2022 - pancake, nibble, Adam Pridgen */ +#define R_LOG_ORIGIN "bin.java" + #include #include "../../shlr/java/class.h" #include "../../shlr/java/code.h" #define IFDBG_BIN_JAVA if (0) +// XXX we need to refactor rbin i guess to get rid of this static R_TH_LOCAL Sdb *DB = NULL; static void add_bin_obj_to_sdb(RBinJavaObj *bin); @@ -23,7 +26,7 @@ static int init(void *user) { } static int fini(void *user) { - IFDBG_BIN_JAVA eprintf ("Calling plugin fini = %d.\n", DB? 1: 0); + R_LOG_DEBUG ("Calling plugin fini = %d", DB? 1: 0); if (!DB) { IFDBG_BIN_JAVA eprintf ("plugin DB already uninited.\n"); } else { diff --git a/libr/core/Makefile b/libr/core/Makefile index 4529e54baa..d01308ef55 100644 --- a/libr/core/Makefile +++ b/libr/core/Makefile @@ -3,7 +3,7 @@ include ../config.mk NAME=r_core R2DEPS=r_config r_cons r_io r_util r_flag r_asm r_arch r_esil -R2DEPS+=r_debug r_bin r_lang r_io r_anal r_parse r_bp r_egg +R2DEPS+=r_debug r_bin r_lang r_io r_anal r_bp r_egg R2DEPS+=r_reg r_search r_syscall r_socket r_fs r_magic r_crypto OBJS=core.o cmd.o cfile.o cconfig.o visual.o cio.o yank.o libs.o agraph.o diff --git a/libr/core/meson.build b/libr/core/meson.build index 5182ef9a50..07e15e2f4d 100644 --- a/libr/core/meson.build +++ b/libr/core/meson.build @@ -88,7 +88,6 @@ r_core_deps = [ r_lang_dep, r_magic_dep, r_flag_dep, - r_parse_dep, r_egg_dep, r_debug_dep, r_crypto_dep, @@ -141,7 +140,6 @@ r_core_static_deps = [ r_io_static_dep, r_lang_static_dep, r_magic_static_dep, - r_parse_static_dep, r_reg_static_dep, r_search_static_dep, r_socket_static_dep, @@ -182,7 +180,6 @@ pkgconfig_mod.generate( 'r_fs', 'r_io', 'r_lang', - 'r_parse', 'r_reg', 'r_search', 'r_socket', diff --git a/libr/core/rtr.c b/libr/core/rtr.c index 6180e3842d..61ecd667da 100644 --- a/libr/core/rtr.c +++ b/libr/core/rtr.c @@ -213,7 +213,7 @@ static char *rtr_dir_files(const char *path) { return r_str_append (ptr, "\n"); } -#if __UNIX__ +#if __UNIX__ && !__wasi__ static void dietime(int sig) { eprintf ("It's Time To Die!\n"); exit (0); diff --git a/libr/debug/Makefile b/libr/debug/Makefile index f0bfe3073f..90b4cf5be2 100644 --- a/libr/debug/Makefile +++ b/libr/debug/Makefile @@ -1,7 +1,7 @@ include ../config.mk NAME=r_debug -R2DEPS=r_reg r_anal r_bp r_io r_parse r_cons r_syscall r_arch +R2DEPS=r_reg r_anal r_bp r_io r_cons r_syscall r_arch R2DEPS+=r_socket r_flag r_util r_egg r_crypto r_esil r_bin CFLAGS+=-DR2_PLUGIN_INCORE diff --git a/libr/debug/p/bochs.mk b/libr/debug/p/bochs.mk index ad55dd89de..6d7b937b71 100644 --- a/libr/debug/p/bochs.mk +++ b/libr/debug/p/bochs.mk @@ -16,7 +16,6 @@ endif -include $(STOP)/bochs/deps.mk LDFLAGS+=-L$(LTOP)/util -lr_util LDFLAGS+=-L$(LTOP)/cons -lr_cons -LDFLAGS+=-L$(LTOP)/parse -lr_parse LDFLAGS+=-L$(LTOP)/anal -lr_anal LDFLAGS+=-L$(LTOP)/reg -lr_reg LDFLAGS+=-L$(LTOP)/bp -lr_bp diff --git a/libr/debug/p/gdb.mk b/libr/debug/p/gdb.mk index ea35350d69..3ec7a5c114 100644 --- a/libr/debug/p/gdb.mk +++ b/libr/debug/p/gdb.mk @@ -15,7 +15,6 @@ endif LDFLAGS+=$(LINK) LDFLAGS+=-L$(LTOP)/util -lr_util LDFLAGS+=-L$(LTOP)/cons -lr_cons -LDFLAGS+=-L$(LTOP)/parse -lr_parse LDFLAGS+=-L$(LTOP)/socket -lr_socket LDFLAGS+=-L$(LTOP)/anal -lr_anal LDFLAGS+=-L$(LTOP)/reg -lr_reg diff --git a/libr/debug/p/qnx.mk b/libr/debug/p/qnx.mk index 125bb392d6..3c812de31f 100644 --- a/libr/debug/p/qnx.mk +++ b/libr/debug/p/qnx.mk @@ -18,7 +18,6 @@ endif LDFLAGS+=-L$(LTOP)/util -lr_util LDFLAGS+=-L$(LTOP)/cons -lr_cons -LDFLAGS+=-L$(LTOP)/parse -lr_parse LDFLAGS+=-L$(LTOP)/anal -lr_anal LDFLAGS+=-L$(LTOP)/reg -lr_reg LDFLAGS+=-L$(LTOP)/bp -lr_bp diff --git a/libr/debug/p/winkd.mk b/libr/debug/p/winkd.mk index 4740e179ae..e6def2178a 100644 --- a/libr/debug/p/winkd.mk +++ b/libr/debug/p/winkd.mk @@ -5,7 +5,6 @@ LIB_PATH=$(SHLR)/winkd/ -include ../../../global.mk LDFLAGS+=-L$(LTOP)/util -lr_util LDFLAGS+=-L$(LTOP)/cons -lr_cons -LDFLAGS+=-L$(LTOP)/parse -lr_parse LDFLAGS+=-L$(LTOP)/anal -lr_anal LDFLAGS+=-L$(LTOP)/reg -lr_reg LDFLAGS+=-L$(LTOP)/bp -lr_bp diff --git a/libr/do-ar-sh b/libr/do-ar-sh index 9fb7581fb1..8142054ac5 100644 --- a/libr/do-ar-sh +++ b/libr/do-ar-sh @@ -1,6 +1,6 @@ #!/bin/sh -LIBS="libr/cons/libr_cons.a libr/util/libr_util.a libr/bin/libr_bin.a libr/anal/libr_anal.a libr/bp/libr_bp.a libr/crypto/libr_crypto.a libr/debug/libr_debug.a shlr/sdb/src/libsdb.a libr/core/libr_core.a libr/main/libr_main.a libr/fs/libr_fs.a libr/syscall/libr_syscall.a shlr/java/libr_java.a shlr/zip/librz.a libr/socket/libr_socket.a libr/anal/libr_anal.a libr/flag/libr_flag.a libr/search/libr_search.a libr/reg/libr_reg.a libr/config/libr_config.a libr/io/libr_io.a libr/parse/libr_parse.a libr/bp/libr_bp.a libr/asm/libr_asm.a libr/bp/libr_bp.a libr/egg/libr_egg.a libr/anal/libr_anal.a libr/magic/libr_magic.a libr/lang/libr_lang.a libr/fs/libr_fs.a shlr/grub/libgrubfs.a shlr/capstone/libcapstone.a shlr/gdb/lib/libgdbr.a" +LIBS="libr/cons/libr_cons.a libr/util/libr_util.a libr/bin/libr_bin.a libr/anal/libr_anal.a libr/bp/libr_bp.a libr/crypto/libr_crypto.a libr/debug/libr_debug.a shlr/sdb/src/libsdb.a libr/core/libr_core.a libr/main/libr_main.a libr/fs/libr_fs.a libr/syscall/libr_syscall.a shlr/java/libr_java.a shlr/zip/librz.a libr/socket/libr_socket.a libr/anal/libr_anal.a libr/flag/libr_flag.a libr/search/libr_search.a libr/reg/libr_reg.a libr/config/libr_config.a libr/io/libr_io.a libr/bp/libr_bp.a libr/asm/libr_asm.a libr/bp/libr_bp.a libr/egg/libr_egg.a libr/anal/libr_anal.a libr/magic/libr_magic.a libr/lang/libr_lang.a libr/fs/libr_fs.a shlr/grub/libgrubfs.a shlr/capstone/libcapstone.a shlr/gdb/lib/libgdbr.a" cd .. LIB=libr.a diff --git a/libr/egg/Makefile b/libr/egg/Makefile index cd01a473e3..9df5fa43db 100644 --- a/libr/egg/Makefile +++ b/libr/egg/Makefile @@ -1,7 +1,7 @@ include ../config.mk NAME=r_egg -R2DEPS=r_asm r_syscall r_util r_parse +R2DEPS=r_asm r_syscall r_util R2DEPS+=r_flag r_cons r_reg r_lang r_arch R2DEPS+=r_esil r_anal r_crypto r_search diff --git a/libr/libs.mk b/libr/libs.mk index 973a13b13d..3e30fabce3 100644 --- a/libr/libs.mk +++ b/libr/libs.mk @@ -3,11 +3,11 @@ ifeq ($(LIBS0),) LIBS0=util LIBS1=socket reg cons magic bp config crypto -LIBS2=syscall lang search flag arch esil -LIBS3=parse io -LIBS4=asm fs anal -LIBS5=egg bin -LIBS6=debug +LIBS2=syscall lang search flag arch esil io +LIBS3=asm fs anal +LIBS4=egg bin +LIBS5=debug +LIBS6=core LIBS7=core LIBS8=main diff --git a/libr/main/deps.mk b/libr/main/deps.mk index 205050daa6..bacc521d0f 100644 --- a/libr/main/deps.mk +++ b/libr/main/deps.mk @@ -2,7 +2,7 @@ MAIN_LINK_ALL=1 ifeq ($(MAIN_LINK_ALL),1) R2DEPS=r_config r_cons r_io r_util r_flag r_asm r_core r_arch -R2DEPS+=r_debug r_bin r_lang r_io r_anal r_parse r_bp r_egg r_esil +R2DEPS+=r_debug r_bin r_lang r_io r_anal r_bp r_egg r_esil R2DEPS+=r_reg r_search r_syscall r_socket r_fs r_magic r_crypto else # only works diff --git a/libr/main/meson.build b/libr/main/meson.build index 3f13da65b7..d571bded54 100644 --- a/libr/main/meson.build +++ b/libr/main/meson.build @@ -30,7 +30,6 @@ r_main_deps = [ r_lang_dep, r_io_dep, r_anal_dep, - r_parse_dep, r_bp_dep, r_egg_dep, r_reg_dep, @@ -71,7 +70,6 @@ r_main_static_deps = [ r_lang_static_dep, r_io_static_dep, r_anal_static_dep, - r_parse_static_dep, r_bp_static_dep, r_egg_static_dep, r_reg_static_dep, diff --git a/libr/parse/Makefile b/libr/parse/Makefile deleted file mode 100644 index ddfe986561..0000000000 --- a/libr/parse/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -include ../config.mk - -NAME=r_parse -R2DEPS=r_flag r_util r_syscall r_reg -# indirect dependencies -R2DEPS+=r_cons - -CFLAGS+=-Ic - -# LINK+=$(STOP)/mpc/libmpc.a -# CFLAGS+=-I$(STOP)/mpc/ - -include $(SHLR)/zip/deps.mk - -foo: - @for TARGET in pre libr_parse.${EXT_SO} \ - libr_parse.${EXT_AR} plugins bins ; do \ - ${MAKE} $$TARGET ; done - -CFLAGS+=-DR2_PLUGIN_INCORE --include ${STATIC_PARSE_PLUGINS} -STATIC_OBJS=$(subst ..,p/..,$(subst parse_,p/parse_,$(STATIC_OBJ))) -OBJS=parse.o filter.o ${STATIC_OBJS} -# OBJS+=c/tccgen.o c/tccpp.o c/libtcc.o - -pre: - -bins: -# @cd t && ${MAKE} all - -plugins: - @cd p && ${MAKE} all - -.PHONY: sdb-sync sync-sdb sdbclean - -include ../rules.mk diff --git a/libr/parse/meson.build b/libr/parse/meson.build deleted file mode 100644 index 53573fe56b..0000000000 --- a/libr/parse/meson.build +++ /dev/null @@ -1,78 +0,0 @@ -# handle tcc dependency (heavily modified version) -r_parse_sources = [ - 'filter.c', - 'parse.c', - 'p/parse_6502_pseudo.c', - 'p/parse_arm_pseudo.c', - 'p/parse_evm_pseudo.c', - 'p/parse_bpf_pseudo.c', - 'p/parse_att2intel.c', - 'p/parse_avr_pseudo.c', - 'p/parse_chip8_pseudo.c', - 'p/parse_dalvik_pseudo.c', - 'p/parse_m68k_pseudo.c', - 'p/parse_mips_pseudo.c', - 'p/parse_ppc_pseudo.c', - 'p/parse_sh_pseudo.c', - 'p/parse_tms320_pseudo.c', - 'p/parse_v850_pseudo.c', - 'p/parse_wasm_pseudo.c', - 'p/parse_x86_pseudo.c', - 'p/parse_riscv_pseudo.c', - 'p/parse_z80_pseudo.c' -] - -r_parse = library('r_parse', r_parse_sources, - include_directories: platform_inc, - c_args: library_cflags, - dependencies: [ - r_util_dep, - r_flag_dep, - r_syscall_dep, - r_reg_dep, - r_cons_dep - ], - install: true, - implicit_include_directories: false, - install_rpath: rpath_lib, - soversion: r2_libversion -) - -r_parse_dep = declare_dependency(link_with: r_parse, - include_directories: platform_inc) - -if get_option('blob') -r_parse_static = static_library('r_parse_static', r_parse_sources, - include_directories: platform_inc, - c_args: library_cflags, - dependencies: [ - r_util_static_dep, - r_flag_static_dep, - r_syscall_static_dep, - r_reg_static_dep, - r_cons_static_dep - ], - install: true, - implicit_include_directories: false, - install_rpath: rpath_lib, -) - -r_parse_static_dep = declare_dependency(link_with: r_parse_static, - include_directories: platform_inc) -endif - -pkgconfig_mod.generate(r_parse, - subdirs: 'libr', - version: r2_version, - name: 'r_parse', - filebase: 'r_parse', - libraries: pkgcfg_sanitize_libs, - requires: [ - 'r_util', - 'r_flag', - 'r_cons', - 'r_syscall', - 'r_reg' - ], - description: 'radare foundation libraries' -) diff --git a/libr/parse/p/Makefile b/libr/parse/p/Makefile deleted file mode 100644 index 9c9b1bc598..0000000000 --- a/libr/parse/p/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -include ../../config.mk -include ../../../mk/platform.mk -include ../../../shlr/zip/deps.mk - -CFLAGS+=-I../../include -Wall ${PIC_CFLAGS} ${LDFLAGS_LIB} ${LDFLAGS_LINKPATH}.. -# -D__UNIX__ -CFLAGS+=-DR2_PLUGIN_INCORE -LDFLAGS+=${LINK} - -ifeq ($(WITHPIC),1) -all: ${ALL_TARGETS} - -ALL_TARGETS= -ARCHS=att2intel.mk x86_pseudo.mk chip8_pseudo.mk -ARCHS+=arm_pseudo.mk z80_pseudo.mk ppc_pseudo.mk 6502_pseudo.mk -ARCHS+=m68k_pseudo.mk sh_pseudo.mk avr_pseudo.mk wasm_pseudo.mk -include $(ARCHS) - -clean: - -rm -f *.${EXT_SO} *.o ${STATIC_OBJ} - -mrproper: clean - -rm -f *.d */*.d - -.PHONY: all clean mrproper -else -all clean mrproper: - -.PHONY: all clean mrproper -endif diff --git a/meson.build b/meson.build index f0e989167c..49a17022da 100644 --- a/meson.build +++ b/meson.build @@ -601,7 +601,6 @@ subdir('libr/arch') subdir('libr/fs') subdir('libr/bin') subdir('libr/config') -subdir('libr/parse') subdir('libr/lang') subdir('libr/asm') subdir('libr/esil') @@ -634,7 +633,6 @@ if meson.is_subproject() r_io_dep, r_lang_dep, r_magic_dep, - r_parse_dep, r_reg_dep, r_search_dep, r_socket_dep, diff --git a/mk/meson.mk b/mk/meson.mk index 4ecd520bfb..22a29a2238 100644 --- a/mk/meson.mk +++ b/mk/meson.mk @@ -29,7 +29,6 @@ meson-symstall: symstall-sdb ln -fs $(PWD)/build/libr/reg/libr_reg.$(EXT_SO) ${L}/libr_reg.$(EXT_SO) ln -fs $(PWD)/build/libr/bin/libr_bin.$(EXT_SO) ${L}/libr_bin.$(EXT_SO) ln -fs $(PWD)/build/libr/config/libr_config.$(EXT_SO) ${L}/libr_config.$(EXT_SO) - ln -fs $(PWD)/build/libr/parse/libr_parse.$(EXT_SO) ${L}/libr_parse.$(EXT_SO) ln -fs $(PWD)/build/libr/lang/libr_lang.$(EXT_SO) ${L}/libr_lang.$(EXT_SO) ln -fs $(PWD)/build/libr/asm/libr_asm.$(EXT_SO) ${L}/libr_asm.$(EXT_SO) ln -fs $(PWD)/build/libr/anal/libr_anal.$(EXT_SO) ${L}/libr_anal.$(EXT_SO) diff --git a/pkgcfg/r_asm.pc.acr b/pkgcfg/r_asm.pc.acr index 3bacc6948a..053c68c393 100644 --- a/pkgcfg/r_asm.pc.acr +++ b/pkgcfg/r_asm.pc.acr @@ -6,6 +6,6 @@ includedir=${prefix}/include Name: r_asm Description: radare foundation libraries Version: @VERSION@ -Requires: r_syscall r_lang r_util r_parse r_flag r_cons r_reg r_arch +Requires: r_syscall r_lang r_util r_flag r_cons r_reg r_arch Libs: -L${libdir} -lr_asm Cflags: -I${includedir}/libr diff --git a/pkgcfg/r_core.pc.acr b/pkgcfg/r_core.pc.acr index be9e3b6675..e7f552412c 100644 --- a/pkgcfg/r_core.pc.acr +++ b/pkgcfg/r_core.pc.acr @@ -6,6 +6,6 @@ includedir=${prefix}/include Name: r_core Description: radare foundation libraries Version: @VERSION@ -Requires: r_config r_cons r_io r_util r_flag r_asm r_debug r_bin r_lang r_io r_anal r_parse r_bp r_egg r_reg r_search r_syscall r_socket r_fs r_magic r_crypto r_arch r_esil +Requires: r_config r_cons r_io r_util r_flag r_asm r_debug r_bin r_lang r_io r_anal r_bp r_egg r_reg r_search r_syscall r_socket r_fs r_magic r_crypto r_arch r_esil Libs: -L${libdir} -lr_core @SSL_LDFLAGS@ @CAPSTONE_LDFLAGS@ Cflags: -I${includedir}/libr @SSL_CFLAGS@ @CAPSTONE_CFLAGS@ diff --git a/pkgcfg/r_debug.pc.acr b/pkgcfg/r_debug.pc.acr index 09891f0cbe..2ef1f65db6 100644 --- a/pkgcfg/r_debug.pc.acr +++ b/pkgcfg/r_debug.pc.acr @@ -6,6 +6,6 @@ includedir=${prefix}/include Name: r_debug Description: radare foundation libraries Version: @VERSION@ -Requires: r_reg r_anal r_bp r_io r_parse r_cons r_syscall r_crypto r_flag r_util r_egg r_socket +Requires: r_reg r_anal r_bp r_io r_cons r_syscall r_crypto r_flag r_util r_egg r_socket Libs: -L${libdir} -lr_debug Cflags: -I${includedir}/libr diff --git a/pkgcfg/r_egg.pc.acr b/pkgcfg/r_egg.pc.acr index 36cf072ee2..32c877ecf7 100644 --- a/pkgcfg/r_egg.pc.acr +++ b/pkgcfg/r_egg.pc.acr @@ -6,6 +6,6 @@ includedir=${prefix}/include Name: r_egg Description: radare foundation libraries Version: @VERSION@ -Requires: r_asm r_syscall r_util r_parse r_reg r_flag r_cons +Requires: r_asm r_syscall r_util r_reg r_flag r_cons Libs: -L${libdir} -lr_egg Cflags: -I${includedir}/libr diff --git a/pkgcfg/r_parse.pc.acr b/pkgcfg/r_parse.pc.acr deleted file mode 100644 index c8277a8874..0000000000 --- a/pkgcfg/r_parse.pc.acr +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@PREFIX@ -exec_prefix=${prefix} -libdir=@LIBDIR@ -includedir=${prefix}/include - -Name: r_parse -Description: radare foundation libraries -Version: @VERSION@ -Requires: r_flag r_util r_syscall r_reg r_cons -Libs: -L${libdir} -lr_parse -Cflags: -I${includedir}/libr diff --git a/sys/rebuild.sh b/sys/rebuild.sh index 553dac653a..d122262c90 100755 --- a/sys/rebuild.sh +++ b/sys/rebuild.sh @@ -97,7 +97,7 @@ RebuildZip() { RebuildTcc() { Rebuild shlr/tcc - Rebuild libr/parse + Rebuild libr/asm } case "$1" in diff --git a/test/unit/legacy_unit/egg/Makefile b/test/unit/legacy_unit/egg/Makefile index a6cb6ac147..605740f4ce 100644 --- a/test/unit/legacy_unit/egg/Makefile +++ b/test/unit/legacy_unit/egg/Makefile @@ -9,7 +9,7 @@ TESTS+=fun5 fun6 include ../../config.mk -BINDEPS=r_egg r_asm r_parse r_syscall r_db r_util +BINDEPS=r_egg r_asm r_syscall r_db r_util BIN=test OBJ=test.o diff --git a/test/unit/legacy_unit/parse/Makefile b/test/unit/legacy_unit/parse/Makefile index 73cfe73dd6..1fc03b1fd6 100644 --- a/test/unit/legacy_unit/parse/Makefile +++ b/test/unit/legacy_unit/parse/Makefile @@ -2,6 +2,6 @@ include ../../config.mk OBJS=parse.o BIN=parse -BINDEPS=r_parse r_util r_flags r_cons r_anal r_reg r_syscall r_db +BINDEPS=r_util r_flags r_cons r_anal r_reg r_syscall r_db include ../../rules.mk diff --git a/test/unit/meson.build b/test/unit/meson.build index 2f62db00c4..0bb1a87cf8 100644 --- a/test/unit/meson.build +++ b/test/unit/meson.build @@ -87,7 +87,6 @@ if get_option('enable_tests') r_reg_dep, r_syscall_dep, r_anal_dep, - r_parse_dep, r_egg_dep, r_search_dep, r_crypto_dep,