Merge RParse into RAsm ##api

This commit is contained in:
pancake 2022-12-03 02:26:41 +01:00 committed by GitHub
parent afaf4cbb05
commit ccb7351b5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
88 changed files with 83 additions and 270 deletions

3
.github/labeler.yml vendored
View File

@ -83,9 +83,6 @@ RLang:
RMagic:
- libr/magic/**/*
RParse:
- libr/parse/**/*
RReg:
- libr/reg/**/*

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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,

View File

@ -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

View File

@ -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,

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

2
configure vendored
View File

@ -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

View File

@ -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

View File

@ -25,7 +25,7 @@
"pancake <pancake@nopcode.org>"
],
"name": "radare2-git",
"version": "5.7.8",
"version": "5.7.9",
"bugs": {
"url": "https://github.com/radareorg/radare2/issues"
},

View File

@ -1,7 +1,6 @@
STATIC="
arch.x86_nz
arch.arm
asm.null
anal.dalvik
anal.wasm
anal.pyc

View File

@ -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}

View File

@ -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',

View File

@ -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

View File

@ -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) {

View File

@ -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'

View File

@ -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}

View File

@ -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}

View File

@ -1,23 +0,0 @@
/* radare - LGPL - Copyright 2019-2022 - pancake */
#include <r_asm.h>
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

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -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}

View File

@ -1,11 +1,14 @@
/* radare - LGPL - Copyright 2009-2022 - pancake, nibble, Adam Pridgen <dso@rice.edu || adam.pridgen@thecoverofnight.com> */
#define R_LOG_ORIGIN "bin.java"
#include <r_bin.h>
#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 {

View File

@ -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

View File

@ -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',

View File

@ -213,7 +213,7 @@ static char *rtr_dir_files(const char *path) {
return r_str_append (ptr, "</body></html>\n");
}
#if __UNIX__
#if __UNIX__ && !__wasi__
static void dietime(int sig) {
eprintf ("It's Time To Die!\n");
exit (0);

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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,

View File

@ -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

View File

@ -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'
)

View File

@ -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

View File

@ -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,

View File

@ -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)

View File

@ -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

View File

@ -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@

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -97,7 +97,7 @@ RebuildZip() {
RebuildTcc() {
Rebuild shlr/tcc
Rebuild libr/parse
Rebuild libr/asm
}
case "$1" in

View File

@ -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

View File

@ -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

View File

@ -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,