Repository navigation
Conversation
wargio
reviewed
Apr 13, 2026
Comment on lines
-33
to
-58
| **Makefile** | ||
|
|
||
| ```makefile | ||
| NAME=analysis_mycpu | ||
| RZ_PLUGIN_PATH=$(shell rizin -H RZ_USER_PLUGINS) | ||
| LIBEXT=$(shell rizin -H LIBEXT) | ||
| CFLAGS=-g -fPIC $(shell pkg-config --cflags rz_analysis) | ||
| LDFLAGS=-shared $(shell pkg-config --libs rz_analysis) | ||
| OBJS=$(NAME).o | ||
| LIB=$(NAME).$(LIBEXT) | ||
|
|
||
| all: $(LIB) | ||
|
|
||
| clean: | ||
| rm -f $(LIB) $(OBJS) | ||
|
|
||
| $(LIB): $(OBJS) | ||
| $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $(LIB) | ||
|
|
||
| install: | ||
| cp -f analysis_mycpu.$(SO_EXT) $(RZ_PLUGIN_PATH) | ||
|
|
||
| uninstall: | ||
| rm -f $(RZ_PLUGIN_PATH)/analysis_mycpu.$(SO_EXT) | ||
| ``` | ||
|
|
notxvilka
requested changes
Apr 13, 2026
Author
|
@wargio @notxvilka @Rot127 can any of you review this again pls |
notxvilka
requested changes
Nov 26, 2026
| #endif | ||
| ``` | ||
|
|
||
| After creating this plugin, include this plugin file in corresponding `librz/arch/p/arch_mycpu.c` |
Contributor
There was a problem hiding this comment.
"After creating the plugin include this file..."
| two modules - RzAsm and RzAnalysis. Thus, we need to write an analysis plugin too. | ||
| The principle is very similar - you just need to create a C file and | ||
| corresponding Makefile. | ||
| The principle is very similar - you just need to create a C file in `librz/arch/p/analysis/` and declare it in corresponding architecture plugin file `librz/arch/p/arch_mycpu.c`. |
Rot127
requested changes
Nov 26, 2026
| Rizin has modular architecture, thus adding support for a new architecture is very easy, if you | ||
| are fluent in C. For various reasons it might be easier to implement it out of the tree. For this we | ||
| will need to create single C file, called `asm_mycpu.c` and a meson file for it. | ||
| will need two C files mainly, called `asm_mycpu.c` in `librz/arch/p/asm/` , `arch_mycpu.c` in `librz/arch/p/` and declare the asm plugin in architecture plugin file . |
Member
There was a problem hiding this comment.
Missing file name and path of the architecture file.
Author
There was a problem hiding this comment.
The file name and path is mentioned here right? did you mean anything else?
| That's where most of our code will be, the key part is to declare a `RzAsmPlugin` containing a valid `disassemble` | ||
| field, a function pointer to the actual disassembler function. | ||
| - `librz/arch/p/asm_mycpu.c` | ||
| That's where most of our code will be, the key part is to declare a `RzAsmPlugin` containing a valid `disassemble` |
Member
There was a problem hiding this comment.
That's where most of our code will be,
Nah, the bunch of code should be in librz/arch/isa/mycpu/ please
Jagath-P
force-pushed
the
disassembly_update
branch
from
November 27, 2026 17:36
679a6bf to
6e49ac5
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Your checklist for this pull request