RFR: 8295795: hsdis does not build with binutils 2.39+

Magnus Ihse Bursie ihse at openjdk.org
Mon Jan 23 14:26:26 UTC 2023


On Fri, 21 Oct 2022 15:26:59 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> Fails like this:
> 
> 
> $ sh ./configure --with-boot-jdk=jdk19u-ea --with-hsdis=binutils --with-binutils-src=binutils-2.39
> $ make clean build-hsdis
> 
> === Output from failing command(s) repeated here ===
> * For target support_hsdis_hsdis-binutils.o:

RISC-V in Capstone seems to be in a bit of a limbo. The welcome page says:

> Highlight features
>    Multi-architectures: [...] , RISCV, [...] ([details](http://www.capstone-engine.org/arch.html)).

but the "details" page does not mention RISC-V.

Some digging indicate that RISC-V has been present for 2 years in their `next` branch:  https://github.com/capstone-engine/capstone/blob/next/include/capstone/riscv.h

Is there any other platforms apart from RISC-V missing?

My understanding from previous bouts of this discussion is that binutils format strings differently from other disassemblers, and is more or less "clever" in resolving some constructs. If this is a blocker, I think there are some possibilities to tweak some knobs on Capstone to make it appear more like binutils.

If upgrading binutils to 2.39+ is a dead end, or at least requires more intrusive changes, I think it might be just as worthwhile in spending that time trying to make Capstone a full-fledged replacement for binutils.

-------------

PR: https://git.openjdk.org/jdk/pull/10817


More information about the hotspot-compiler-dev mailing list