Open XVilka opened 3 years ago
I was trying to update hppa/gnu
. It compiles fine, but they seem to have changed their format a bit and removed braces for if
statements with one lines, making a huge diff at some places. Should I do anything with that?
IMHO the code should be taken as-is from upstream and moved to a subproject. If necessary (it is necessary likely) we will provide a custom meson.build as done for others subprojects to create a meson object that compiles the right files with the right config.
i don't expect much work to happen here any time soon. Also, as I will refactor plugins hopefully immediately after 0.4.0, it would be better to have the dependency to binutils limited to those plugins.
Until we figured how to reuse the code using linking or Meson subprojects, it's better to update the binutils code in Rizin to support more instructions. The current code is very old.
Pieces from binutils-gdb were used in many different places (opcodes library/libopcodes, libiberty, BFD library):
librz/asm/arch/arm/aarch64/
librz/asm/arch/cris/gnu/
librz/asm/arch/mips/gnu/
(will be removed) https://github.com/rizinorg/rizin/pull/3508librz/asm/arch/nios/gnu/
(architectures support was removed completely)librz/asm/arch/xtensa/gnu/
(was removed) during the capstone auto-sync for Xtensa by @imbillowlibrz/asm/arch/tricore/gnu/
(was removed) https://github.com/rizinorg/rizin/pull/3463librz/asm/arch/hppa/gnu/
(will be removed) https://github.com/rizinorg/rizin/pull/4469librz/asm/arch/sparc/gnu/
(will be removed) during the capstone auto-sync for RISC-V: https://github.com/capstone-engine/capstone/issues/2015librz/asm/arch/riscv/
(will be removed) during the capstone auto-sync for RISC-V: https://github.com/capstone-engine/capstone/issues/2015librz/asm/arch/arc/gnu/
(will be removed) during the capstone auto-sync for ARClibrz/asm/arch/lanai/gnu/
librz/asm/arch/vax/
Please be careful, since some of these copied sources could have custom modifications after they were imported - I recommend to check the git history of Rizin and Radare2 to see them. Good example how to do that is in a similar issue for libmagic: https://github.com/rizinorg/rizin/issues/721
See also https://github.com/rizinorg/rizin/issues/2704