RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v6]
Vladimir Kempik
vkempik at openjdk.java.net
Mon Feb 1 11:22:47 UTC 2021
On Mon, 1 Feb 2021 09:31:31 GMT, Alan Hayward <github.com+4146708+a74nh at openjdk.org> wrote:
> You need add macos arm64 to hsdis. Having it working is fairly essential for debugging.
>
> Inside src/utils/hsdis, After cloning binutils
>
> ```
> make; make demo; ./build/macosx-arm64/hsdis-demo
> ```
>
> Results in:
>
> ```
> Hello, world!
> ...And now for something completely different:
>
> Decoding from 0x1046e31a4 to 0x1046e3664...with decode_instructions_virtual
> hsdis: bad native mach=architecture not set in Makefile!; please port hsdis to this platform
> hsdis output options:
> ```
>
> I fixed it by changing the makefile to force the build flags:
>
> ```
> ARCH=aarch64
> CFLAGS/aarch64 += -m64
> ```
>
> Resulting in:
>
> ```
> Hello, world!
> ...And now for something completely different:
>
> Decoding from 0x10012719c to 0x10012765c...with decode_instructions_virtual
> Decoding for CPU 'aarch64'
> main:
> 0x10012719c sub sp, sp, #0x60
> 0x1001271a0 stp x29, x30, [sp, #80]
> ...etc
> ```
>
> Putting the library in the right place then made disassembly in java work for me.
Hello, hsdis is a separate out-of-tree project and is not part of this jep.
support for looking for proper hsdis dylib library was added as part of this jep.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2200
More information about the security-dev
mailing list