Skip to content

Commit

Permalink
Remove GRUB and librz_fs plugins (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
XVilka authored Oct 2, 2020
1 parent 45ca181 commit 8810586
Show file tree
Hide file tree
Showing 234 changed files with 89 additions and 34,239 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ build_sdb
config-user.mk
librz/bin/d/dll/dll
librz/config.h
librz/include/r_userconf.h
librz/include/r_version.h
librz/include/r_version.h.tmp
librz/include/rz_userconf.h
librz/include/rz_version.h
librz/include/rz_version.h.tmp
shlr/capstone/
shlr/java/out
shlr/java/out.exe
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,6 @@ meson-symstall: symstall-sdb
ln -fs $(PWD)/build/librz/asm/librz_asm.$(EXT_SO) ${L}/librz_asm.$(EXT_SO)
ln -fs $(PWD)/build/librz/anal/librz_anal.$(EXT_SO) ${L}/librz_anal.$(EXT_SO)
ln -fs $(PWD)/build/librz/egg/librz_egg.$(EXT_SO) ${L}/librz_egg.$(EXT_SO)
ln -fs $(PWD)/build/librz/fs/librz_fs.$(EXT_SO) ${L}/librz_fs.$(EXT_SO)
ln -fs $(PWD)/build/librz/debug/librz_debug.$(EXT_SO) ${L}/librz_debug.$(EXT_SO)
ln -fs $(PWD)/build/librz/core/librz_core.$(EXT_SO) ${L}/librz_core.$(EXT_SO)

Expand Down
2 changes: 0 additions & 2 deletions binrz/blob/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ LDFLAGS+=-L../../librz/anal -lrz_anal
LDFLAGS+=-L../../librz/crypto -lrz_crypto
LDFLAGS+=-L../../librz/flag -lrz_flag
LDFLAGS+=-L../../librz/parse -lrz_parse
LDFLAGS+=-L../../librz/fs -lrz_fs
LDFLAGS+=-L../../librz/magic -lrz_magic
LDFLAGS+=-L../../librz/syscall -lrz_syscall
LDFLAGS+=-L../../librz/util -lrz_util
Expand All @@ -60,7 +59,6 @@ include ../../shlr/zip/deps.mk
include ../../shlr/gdb/deps.mk
include ../../shlr/java/deps.mk
include ../../shlr/bochs/deps.mk
include ../../shlr/grub/deps.mk
include ../../shlr/qnx/deps.mk
include ../../shlr/ar/deps.mk
include ../../shlr/sdb.mk
Expand Down
2 changes: 1 addition & 1 deletion binrz/preload/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ISLIB=1
BINDEPS=rz_core rz_parse rz_search rz_cons rz_config
BINDEPS+=rz_bin rz_debug rz_anal rz_reg rz_bp rz_io
BINDEPS+=rz_lang rz_asm rz_syscall rz_hash rz_crypto
BINDEPS+=rz_magic rz_socket rz_flag rz_util rz_egg rz_fs
BINDEPS+=rz_magic rz_socket rz_flag rz_util rz_egg

include ../rules.mk

Expand Down
3 changes: 1 addition & 2 deletions binrz/rizin/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BIN=rizin
BINDEPS=rz_core rz_parse rz_search rz_cons rz_config
BINDEPS+=rz_bin rz_debug rz_anal rz_reg rz_bp rz_io rz_fs
BINDEPS+=rz_bin rz_debug rz_anal rz_reg rz_bp rz_io
BINDEPS+=rz_lang rz_asm rz_syscall rz_hash rz_main
BINDEPS+=rz_magic rz_socket rz_flag rz_egg rz_crypto rz_util

Expand Down Expand Up @@ -93,7 +93,6 @@ include ../../shlr/zip/deps.mk
include ../../shlr/gdb/deps.mk
include ../../shlr/java/deps.mk
include ../../shlr/bochs/deps.mk
include ../../shlr/grub/deps.mk
include ../../shlr/qnx/deps.mk
include ../../shlr/ar/deps.mk
include ../../shlr/yxml/deps.mk
Expand Down
1 change: 0 additions & 1 deletion binrz/rizin/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ executable('rizin', 'rizin.c',
rz_socket_dep,
rz_core_dep,
rz_io_dep,
rz_fs_dep,
rz_bin_dep,
rz_flag_dep,
rz_cons_dep,
Expand Down
3 changes: 1 addition & 2 deletions binrz/rz-bin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ BIN=rz-bin
BINDEPS=rz_magic rz_core rz_bin rz_egg rz_cons rz_main
BINDEPS+=rz_config rz_io rz_flag rz_asm
BINDEPS+=rz_debug rz_hash rz_lang rz_anal rz_parse rz_bp rz_reg
BINDEPS+=rz_search rz_syscall rz_socket rz_fs rz_magic rz_crypto rz_util
BINDEPS+=rz_search rz_syscall rz_socket rz_magic rz_crypto rz_util

include ../rules.mk

Expand All @@ -11,7 +11,6 @@ include ../../librz/main/deps.mk
include ../../shlr/zip/deps.mk
include ../../shlr/gdb/deps.mk
include ../../shlr/java/deps.mk
include ../../shlr/grub/deps.mk
include ../../shlr/bochs/deps.mk
include ../../shlr/qnx/deps.mk
include ../../shlr/ar/deps.mk
Expand Down
2 changes: 1 addition & 1 deletion binrz/rz-diff/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
BIN=rz-diff

BINDEPS=rz_core rz_config rz_cons rz_search rz_anal
BINDEPS+=rz_bin rz_debug rz_io rz_asm rz_hash rz_fs rz_crypto
BINDEPS+=rz_bin rz_debug rz_io rz_asm rz_hash rz_crypto
BINDEPS+=rz_socket rz_flag rz_lang rz_reg rz_bp rz_parse
BINDEPS+=rz_syscall rz_magic rz_util rz_parse rz_egg rz_main

Expand Down
3 changes: 1 addition & 2 deletions binrz/rz-gg/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BIN=rz-gg
BINDEPS=rz_egg rz_syscall rz_asm
BINDEPS+=rz_core rz_hash rz_debug rz_fs rz_config rz_bp rz_crypto rz_cons
BINDEPS+=rz_core rz_hash rz_debug rz_config rz_bp rz_crypto rz_cons
BINDEPS+=rz_lang rz_parse rz_anal rz_reg rz_flag rz_crypto
BINDEPS+=rz_bin rz_search rz_io rz_socket
BINDEPS+=rz_magic rz_util rz_main
Expand All @@ -11,7 +11,6 @@ include ../../shlr/ar/deps.mk
include ../../librz/socket/deps.mk
include ../../shlr/bochs/deps.mk
include ../../shlr/gdb/deps.mk
include ../../shlr/grub/deps.mk
include ../../shlr/java/deps.mk
include ../../shlr/capstone.mk
include ../../shlr/qnx/deps.mk
Expand Down
1 change: 0 additions & 1 deletion binrz/rz-gg/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ executable('rz-gg', 'rz-gg.c',
rz_core_dep,
rz_hash_dep,
rz_debug_dep,
rz_fs_dep,
rz_config_dep,
rz_bp_dep,
rz_crypto_dep
Expand Down
4 changes: 2 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ printf "\nOptional Features:
--with-syscapstone force to use system-wide capstone
--with-syszip force to use system's libzip and zlib
--with-sysxxhash force to use system's xxhash
--without-gpl do not build GPL code (grub, cxx, ... )
--without-gpl do not build GPL code (cxx, ... )
--with-openssl build with openssl if possible
--without-libuv disable libuv dependency
--with-rpath use rpath to build
Expand Down Expand Up @@ -704,7 +704,7 @@ for A in ${ENVWORDS} ; do
SEDFLAGS="${SEDFLAGS}s,@${A}@,${VAR},g;"
done
SEDFLAGS="${SEDFLAGS}'"
for A in ./config-user.mk librz/include/rz_userconf.h pkgcfg/rz_io.pc pkgcfg/rz_magic.pc pkgcfg/rz_asm.pc pkgcfg/rz_bin.pc pkgcfg/rz_anal.pc pkgcfg/rz_hash.pc pkgcfg/rz_cons.pc pkgcfg/rz_core.pc pkgcfg/rz_lang.pc pkgcfg/rz_socket.pc pkgcfg/rz_debug.pc pkgcfg/rz_reg.pc pkgcfg/rz_config.pc pkgcfg/rz_flag.pc pkgcfg/rz_syscall.pc pkgcfg/rz_util.pc pkgcfg/rz_search.pc pkgcfg/rz_bp.pc pkgcfg/rz_parse.pc pkgcfg/rz_fs.pc pkgcfg/rz_egg.pc pkgcfg/rz_crypto.pc ; do # SUBDIRS
for A in ./config-user.mk librz/include/rz_userconf.h pkgcfg/rz_io.pc pkgcfg/rz_magic.pc pkgcfg/rz_asm.pc pkgcfg/rz_bin.pc pkgcfg/rz_anal.pc pkgcfg/rz_hash.pc pkgcfg/rz_cons.pc pkgcfg/rz_core.pc pkgcfg/rz_lang.pc pkgcfg/rz_socket.pc pkgcfg/rz_debug.pc pkgcfg/rz_reg.pc pkgcfg/rz_config.pc pkgcfg/rz_flag.pc pkgcfg/rz_syscall.pc pkgcfg/rz_util.pc pkgcfg/rz_search.pc pkgcfg/rz_bp.pc pkgcfg/rz_parse.pc pkgcfg/rz_egg.pc pkgcfg/rz_crypto.pc ; do # SUBDIRS
if [ -f "${VPATH}/${A}.acr" ]; then
SD_TARGET=${A}
else
Expand Down
3 changes: 1 addition & 2 deletions configure.acr
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ IFAND HAVE_LIB_XXHASH USE_XXHASH {
LIBXXHASH = '' ;
}

ARG_WITHOUT WITH_GPL gpl do not build GPL code (grub, cxx, ... ) ;
ARG_WITHOUT WITH_GPL gpl do not build GPL code (cxx, ... ) ;

CHKDECL sys/personality.h ADDR_NO_RANDOMIZE
CHKDECL features.h __GLIBC__
Expand Down Expand Up @@ -268,7 +268,6 @@ SUBDIRS ./config-user.mk
pkgcfg/rz_search.pc
pkgcfg/rz_bp.pc
pkgcfg/rz_parse.pc
pkgcfg/rz_fs.pc
pkgcfg/rz_egg.pc
pkgcfg/rz_crypto.pc
;
2 changes: 1 addition & 1 deletion doc/emscripten.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ emcc -O2 rz_ax.o ../../librz/util/librz_util.a -o rz_ax.js
binrz/rz_asm/rz_asm.js:
emcc -O2 -L.. -o rz_asm.js ../../shlr/sdb/src/libsdb.a ../../librz/fs/p/grub/libgrubfs.a -lm $A/util/librz_util.a $A/asm/librz_asm.a rz_asm.o ../../librz/util/librz_util.a ../../librz/parse/librz_parse.a ../../librz/db/libr_db.a ../../librz/syscall/librz_syscall.a ../../librz/asm/librz_asm.a ../../librz/lib/libr_lib.a ../../librz/db/libr_db.a ../../shlr/sdb/src/libsdb.a ../../librz/util/librz_util.a
emcc -O2 -L.. -o rz_asm.js ../../shlr/sdb/src/libsdb.a -lm $A/util/librz_util.a $A/asm/librz_asm.a rz_asm.o ../../librz/util/librz_util.a ../../librz/parse/librz_parse.a ../../librz/db/libr_db.a ../../librz/syscall/librz_syscall.a ../../librz/asm/librz_asm.a ../../librz/lib/libr_lib.a ../../librz/db/libr_db.a ../../shlr/sdb/src/libsdb.a ../../librz/util/librz_util.a
-->
5 changes: 1 addition & 4 deletions librz/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,6 @@ _libr.${EXT_AR}: .librz
librz.${EXT_AR}: .librz
-${AR} -rs $@ .librz/*/*.o
ifeq (1,$(WITH_GPL))
E+=../shlr/grub/libgrubfs.${EXT_AR}
endif
E+=../shlr/yxml/libyxml.${EXT_AR}
E+=../shlr/ar/librz_ar.${EXT_AR}
E+=../shlr/winkd/librz_winkd.${EXT_AR}
Expand Down Expand Up @@ -235,7 +232,7 @@ install: install-includes install-pkgconfig
${INSTALL_LIB} "$$lib" "${DESTDIR}${LIBDIR}/$$lib"; \
fi
# object archives
@for FILE in `find * -type f -iname "*.${EXT_AR}" | grep -v fs/p` ; do \
@for FILE in `find * -type f -iname "*.${EXT_AR}"` ; do \
echo " ${DESTDIR}${LIBDIR}/$$FILE"; ${INSTALL_DATA} $$FILE "${DESTDIR}${LIBDIR}" ; done || true
# plugins
@${INSTALL_DIR} "${DESTDIR}${LIBDIR}/rizin/${VERSION}"
Expand Down
1 change: 0 additions & 1 deletion librz/bin/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ rz_bin_sources = [
'p/bin_dyldcache.c',
'p/bin_elf.c',
'p/bin_elf64.c',
'p/bin_fs.c',
'p/bin_java.c',
'p/bin_ldr_linux.c',
'p/bin_le.c',
Expand Down
2 changes: 1 addition & 1 deletion librz/bin/p/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ all: ${ALL_TARGETS}
ALL_TARGETS=
FORMATS=any.mk elf.mk elf64.mk pe.mk pe64.mk te.mk mach0.mk
FORMATS+=bios.mk mach064.mk dyldcache.mk xnu_kernelcache.mk java.mk
FORMATS+=dex.mk fs.mk ningb.mk coff.mk ningba.mk xbe.mk zimg.mk
FORMATS+=dex.mk ningb.mk coff.mk ningba.mk xbe.mk zimg.mk
FORMATS+=omf.mk cgc.mk dol.mk nes.mk mbn.mk psxexe.mk spc700.mk
FORMATS+=vsf.mk nin3ds.mk bflt.mk wasm.mk sfc.mk
FORMATS+=mdmp.mk z64.mk qnx.mk prg.mk dmp64.mk
Expand Down
110 changes: 0 additions & 110 deletions librz/bin/p/bin_fs.c

This file was deleted.

10 changes: 0 additions & 10 deletions librz/bin/p/fs.mk

This file was deleted.

4 changes: 2 additions & 2 deletions librz/core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ NAME=rz_core

R2DEPS=rz_config rz_cons rz_io rz_util rz_flag rz_asm
R2DEPS+=rz_debug rz_hash rz_bin rz_lang rz_io rz_anal rz_parse rz_bp rz_egg
R2DEPS+=rz_reg rz_search rz_syscall rz_socket rz_fs rz_magic rz_crypto
R2DEPS+=rz_reg rz_search rz_syscall rz_socket rz_magic rz_crypto

OBJS=core.o cmd.o cmd_helps.o cfile.o cconfig.o visual.o cio.o yank.o libs.o agraph.o
OBJS+=fortune.o hack.o vasm.o patch.o cbin.o corelog.o rtr.o cmd_api.o
Expand Down Expand Up @@ -44,7 +44,7 @@ include $(TOP)/shlr/rizin-shell-parser-deps.mk
include $(LTOP)/rules.mk

cmd.o: cmd_hash.c cmd_debug.c cmd_zign.c cmd_project.c \
cmd_open.c cmd_meta.c cmd_macro.c cmd_magic.c cmd_mount.c cmd_eval.c \
cmd_open.c cmd_meta.c cmd_macro.c cmd_magic.c cmd_eval.c \
cmd_seek.c cmd_print.c cmd_help.c cmd_anal.c cmd_search.c cmd_log.c \
cmd_cmp.c cmd_write.c cmd_egg.c cmd_info.c cmd_type.c cmd_flag.c \
cmd_search_rop.c
Expand Down
26 changes: 0 additions & 26 deletions librz/core/cconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -1859,27 +1859,6 @@ static bool cb_cmd_esil_trap(void *user, void *data) {
return true;
}

static bool cb_fsview(void *user, void *data) {
int type = R_FS_VIEW_NORMAL;
RzCore *core = (RzCore *) user;
RConfigNode *node = (RConfigNode *) data;
if (*node->value == '?') {
print_node_options (node);
return false;
}
if (!strcmp (node->value, "all")) {
type = R_FS_VIEW_ALL;
}
if (!strstr (node->value, "del")) {
type |= R_FS_VIEW_DELETED;
}
if (!strstr (node->value, "spe")) {
type |= R_FS_VIEW_SPECIAL;
}
rz_fs_view (core->fs, type);
return true;
}

static bool cb_cmddepth(void *user, void *data) {
RzCore *core = (RzCore *)user;
int c = R_MAX (((RConfigNode*)data)->i_value, 0);
Expand Down Expand Up @@ -3413,11 +3392,6 @@ RZ_API int rz_core_config_init(RzCore *core) {
SETCB ("cmd.esil.todo", "", &cb_cmd_esil_todo, "Command to run when the esil instruction contains TODO");
SETCB ("cmd.esil.ioer", "", &cb_cmd_esil_ioer, "Command to run when esil fails to IO (invalid read/write)");

/* filesystem */
n = NODECB ("fs.view", "normal", &cb_fsview);
SETDESC (n, "Set visibility options for filesystems");
SETOPTIONS (n, "all", "deleted", "special", NULL);

/* hexdump */
SETCB ("hex.header", "true", &cb_hex_header, "Show header in hexdump");
SETCB ("hex.bytes", "true", &cb_hex_bytes, "Show bytes column in hexdump");
Expand Down
Loading

0 comments on commit 8810586

Please sign in to comment.