-
Notifications
You must be signed in to change notification settings - Fork 63
Add support for writing HermitCore (https://hermitcore.org) ELF binaries #122
Add support for writing HermitCore (https://hermitcore.org) ELF binaries #122
Conversation
…ies. HermitCore is a POSIX-compatible kernel for running a single application in an isolated environment to get maximum performance and predictable runtime behavior. It can either be used bare-metal on hardware or a VM (Unikernel) or side by side to an existing Linux system (Multikernel). Due to the latter feature, HermitCore binaries are marked with a different OS ABI to let the Linux ELF loader distinguish them from regular Unix/Linux binaries and load them using the HermitCore "proxy" tool.
This patch is part of a patch series to add HermitCore support to Rust:
CC @stlankes |
Thanks for the PR! We do have a strict policy though for patches like this to be in upstream LLVM before we pull them into our own fork. Would it be possible to wait for the constant allocation and the LLVM patch to land for this? |
Add targets for HermitCore (https://hermitcore.org) to the Rust compiler and port libstd to it. As a start, the port uses the simplest possible configuration (no jemalloc, abort on panic) and makes use of existing Unix-specific code wherever possible. It adds targets for x86_64 (current main HermitCore platform) and aarch64 (HermitCore platform under development). Together with the patches to "liblibc" (rust-lang/libc#1048) and llvm (rust-lang/llvm#122), this enables HermitCore applications to be written in Rust.
Add targets for HermitCore (https://hermitcore.org) to the Rust compiler and port libstd to it. As a start, the port uses the simplest possible configuration (no jemalloc, abort on panic) and makes use of existing Unix-specific code wherever possible. It adds targets for x86_64 (current main HermitCore platform) and aarch64 (HermitCore platform under development). Together with the patches to "liblibc" (rust-lang/libc#1048) and llvm (rust-lang/llvm#122), this enables HermitCore applications to be written in Rust.
Add targets for HermitCore (https://hermitcore.org) to the Rust compiler and port libstd to it. As a start, the port uses the simplest possible configuration (no jemalloc, abort on panic) and makes use of existing Unix-specific code wherever possible. It adds targets for x86_64 (current main HermitCore platform) and aarch64 (HermitCore platform under development). Together with the patches to "liblibc" (rust-lang/libc#1048) and llvm (rust-lang/llvm#122), this enables HermitCore applications to be written in Rust.
Guess I have no other choice ;) |
After a reply from SCO/Xinuos and an explanation regarding the ELFOSABI constants, we came to the conclusion that the existing ELFOSABI_STANDALONE suits our needs. As soon as the patch at https://reviews.llvm.org/D48964 has been officially included into LLVM, this PR can be merged to enable the Rust fork of LLVM to build HermitCore applications. |
This patch has been committed to upstream LLVM in the meantime: https://reviews.llvm.org/D48964 |
Ok great! |
Shouldn't this have targeted |
Yes, this will be great! |
HermitCore is a POSIX-compatible kernel for running a single application in an isolated environment to get maximum performance and predictable runtime behavior. It can either be used bare-metal on hardware or a VM (Unikernel) or side by side to an existing Linux system (Multikernel).
Due to the latter feature, HermitCore binaries are marked with a different OS ABI to let the Linux ELF loader distinguish them from regular Unix/Linux binaries and load them using the HermitCore "proxy" tool.
This patch has also been submitted to LLVM (https://reviews.llvm.org/D48964) and is currently waiting for a reply from [email protected] regarding the official allocation of the ELFOSABI_HERMIT constant.
However, after weeks of waiting, I'm not sure if this E-Mail address and the official ELFOSABI registration still exists. Furthermore, my patch is part of a patch series to add HermitCore as a Rust target.
Therefore, I hope that my patch can be added to the Rust fork of LLVM with the temporary ELFOSABI_HERMIT constant until an official one is assigned. This would unblock my series of Rust patches to add HermitCore support.