rizinorg / rizin

UNIX-like reverse engineering framework and command-line toolset.
https://rizin.re
GNU Lesser General Public License v3.0
2.72k stars 363 forks source link

Update binutils code to the latest binutils #814

Open XVilka opened 3 years ago

XVilka commented 3 years ago

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

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

XVilka commented 3 years ago

See also https://github.com/radareorg/radare2/pull/18579

officialcjunior commented 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?

ret2libc commented 3 years ago

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.

ret2libc commented 2 years ago

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.