#elf #loader #unix

no-std elf_loader

A lightweight, extensible, and high-performance library for loading ELF files

3 releases (breaking)

0.3.0 Dec 9, 2024
0.2.0 Dec 7, 2024
0.1.0 Nov 17, 2024

#379 in Operating systems

Download history 49/week @ 2024-11-11 73/week @ 2024-11-18 10/week @ 2024-11-25 120/week @ 2024-12-02 205/week @ 2024-12-09

457 downloads per month
Used in dlopen-rs

Apache-2.0

97KB
2.5K SLoC

license

elf_loader

A lightweight, extensible, and high-performance library for loading ELF files.
English | 中文

Usage

It implements the general steps for loading ELF files and leaves extension interfaces, allowing users to implement their own customized loaders.

Example

mini-loader

This repository provides an example of a mini-loader implemented using elf_loader. The miniloader can load PIE files and currently only supports x86_64 .

Load ls:

$ cargo build --release -p mini-loader --target=x86_64-unknown-none
$ ./mini-loader /bin/ls

It should be noted that mini-loader must be compiled with the release parameter.

dlopen-rs

dlopen-rs is also implemented based on the elf_loader library. It implements the functionality of dlopen, allowing dynamic libraries to be opened at runtime.

Dependencies

~555KB
~11K SLoC