| Crates.io | polished_elf_loader |
| lib.rs | polished_elf_loader |
| version | 0.1.1 |
| created_at | 2025-06-11 00:25:08.942283+00 |
| updated_at | 2025-06-12 20:24:15.774241+00 |
| description | Modular, safe ELF loader for Polished OS, supporting UEFI and no_std environments. |
| homepage | |
| repository | https://codeberg.org/ofluffydev/polished |
| max_upload_size | |
| id | 1707879 |
| size | 17,701 |
This crate is part of Polished OS, an experimental operating system written in Rust. The ELF loader provides modular, safe ELF (Executable and Linkable Format) loading functionality for use in UEFI bootloaders or other system software that needs to load and execute ELF binaries, such as kernels or userland applications.
The elf_loader library is responsible for:
The loader is designed for use in a UEFI environment and leverages UEFI services for memory allocation when the uefi feature is enabled.
The main entry point is the load_kernel function (enabled with the uefi feature):
let (entry, kernel_entry) = load_kernel("\\EFI\\BOOT\\kernel");
// To start the kernel:
unsafe { kernel_entry() };
Steps performed:
polished_files crate.xmas-elf crate.uefi feature)no_std-compatible designAdd this crate as a dependency in your Cargo workspace. If you are building for UEFI, enable the uefi feature:
[dependencies]
polished_elf_loader = { path = "../elf_loader", features = ["uefi"] }
Unless otherwise noted, all code in this crate is licensed under the zlib License:
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
- This notice may not be removed or altered from any source distribution.
See the LICENSE file for full details.
This library is actively developed as part of Polished OS. Feedback and contributions are welcome!