Skip to content

Instantly share code, notes, and snippets.

@chenfengyuan
Forked from rabbitcount/build-hsdis-macos.sh
Created January 10, 2020 08:27
Show Gist options
  • Save chenfengyuan/1f192941b4a59e213fbd8cdfae2bd7f3 to your computer and use it in GitHub Desktop.
Save chenfengyuan/1f192941b4a59e213fbd8cdfae2bd7f3 to your computer and use it in GitHub Desktop.
Java 10 HotSpot Disassembly on macOS Mojave
#!/bin/bash -e
# Download OpenJDK Reference Implementation Sources from
# http://jdk.java.net/java-se-ri/10
curl -O https://download.java.net/openjdk/jdk10/ri/openjdk-10_src.zip
# Navigate to the hsdis sources
unzip openjdk-10_src.zip
cd openjdk/src/utils/hsdis
# Download binutils 2.26
curl -O https://mirrors.syringanetworks.net/gnu/binutils/binutils-2.26.tar.gz
tar xzvf binutils-2.26.tar.gz
# Build hsdis
make BINUTILS=binutils-2.26 all64
# Install hsdis
sudo cp build/macosx-amd64/hsdis-amd64.dylib /Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/lib/server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment