https://github.com/yasuenag/hsdis-builder
Docker container for building hsdis
https://github.com/yasuenag/hsdis-builder
disassembler dockerfile java
Last synced: 10 months ago
JSON representation
Docker container for building hsdis
- Host: GitHub
- URL: https://github.com/yasuenag/hsdis-builder
- Owner: YaSuenag
- License: mit
- Created: 2018-02-22T11:22:51.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2025-01-13T04:16:21.000Z (about 1 year ago)
- Last Synced: 2025-01-13T05:20:56.266Z (about 1 year ago)
- Topics: disassembler, dockerfile, java
- Language: Shell
- Size: 30.3 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
hsdis-builder
===

Docker container for building [HSDIS](https://github.com/openjdk/jdk/tree/master/src/utils/hsdis). This container can build HSDIS powered by [Capstone](https://www.capstone-engine.org/) for Linux x64/aarch64 in JDK 25 or later.
Base image of this container is Fedora 39. Thus HSDIS which the artifact of this container might not work on older glibc.
## Pull image
See [GitHub Container Registry](https://github.com/YaSuenag/hsdis-builder/pkgs/container/hsdis-builder)
```
$ podman pull ghcr.io/yasuenag/hsdis-builder
```
## Build HSDIS (Run container)
You can get the artifact (HSDIS) from `out` in following example.
### Build HSDIS from upstream
```
podman run -it --rm -v /path/to/outdir:/out:Z ghcr.io/yasuenag/hsdis-builder
```
Link Capstone statically
```
podman run -it --rm -v /path/to/outdir:/out:Z ghcr.io/yasuenag/hsdis-builder -static
```
### Build HSDIS from specified version
> [!NOTE]
> JDK 25 will be released in September 2025 - meanwhile you need to use upstream OpenJDK code.
You need to specify tag in https://github.com/openjdk/jdk
```
podman run -it --rm -v /path/to/outdir:/out:Z ghcr.io/yasuenag/hsdis-builder jdk-25-ga
```
Link Capstone statically
```
podman run -it --rm -v /path/to/outdir:/out:Z ghcr.io/yasuenag/hsdis-builder -static jdk-25-ga
```
## Deploy HSDIS
### JDK 8 or earlier
```sh
$ cp hsdis-amd64.so $JAVA_HOME/jre/lib/amd64/
```
### JDK 9 or later
```sh
$ cp hsdis-amd64.so $JAVA_HOME/lib/
```
## Build container image
```sh
$ buildah bud --layers -t hsdis-builder .
```