https://github.com/alessandro-salerno/ezld
Tiny, simple, and portable ELF linker
https://github.com/alessandro-salerno/ezld
assembler assembly c cli elf elf-parser elf32 libfuzzer linker lowlevel portable rars risc-v risc-v32 riscv-32 rv32i static-linker toolchain
Last synced: about 2 months ago
JSON representation
Tiny, simple, and portable ELF linker
- Host: GitHub
- URL: https://github.com/alessandro-salerno/ezld
- Owner: Alessandro-Salerno
- License: mit
- Created: 2025-04-07T09:51:13.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-04-14T18:38:32.000Z (about 2 months ago)
- Last Synced: 2025-04-15T23:15:16.551Z (about 2 months ago)
- Topics: assembler, assembly, c, cli, elf, elf-parser, elf32, libfuzzer, linker, lowlevel, portable, rars, risc-v, risc-v32, riscv-32, rv32i, static-linker, toolchain
- Language: C
- Homepage:
- Size: 537 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Authors: AUTHORS
Awesome Lists containing this project
README
# βοΈ ezld β Tiny Static ELF Linker
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
> A tiny, simple, and portable static [Linker](https://en.wikipedia.org/wiki/Linker_(computing)) for the [ELF](https://en.wikipedia.org/wiki/Executable_and_Linkable_Format) format.
---
## π Features
- πΉ Command-line interface for direct usage
- πΉ No OS-specific libc dependency (portable across platforms)
- πΉ Supports section alignment, entry point overrides, and more
- πΉ Usable as a library or standalone binary
- πΉ Designed with simplicity and clarity in mind---
## π Usage
```bash
ezld by Alessandro Salerno
The EZ ELF LinkerUsage: ezld [] [] []
COMMANDS:
-h, --help Show this menu
-v, --version Show version informationOPTIONS:
-e, --entry-sym Set the entry point symbol (default: '_start')
-s, --section Set base virtual address for section (e.g., -s .text=0x4000)
-a, --align Set PT_LOAD segment alignment (e.g., -a 0x1000)
-o, --output Set output file path (default: 'a.out')
```---
## βοΈ Building from Source
Use the included `Makefile` to build:
```bash
make debug # Build with debug info, sanitizers, -O0
make release # Build optimized release version
```---
## π¦ Installing via tarman
Install with [`tarman`](https://github.com/Alessandro-Salerno/tarman) from the [tarman user repository](https://github.com/Alessandro-Salerno/tarman-user-repository):
```bash
tarman install -r ezld
```---
## π Portability
> π‘ **ezld is platform-agnostic.**
Though it links **ELF binaries**, it's designed to run on any host, including:
- π§ UNIX-like systems
- πͺ Windows
- π§ͺ [SalernOS](https://github.com/Alessandro-Salerno/SalernOS-Kernel)ezld avoids non-standard libc functions, improving portability and making it suitable for low-level projects, OS development, or educational purposes.
---
## π¨βπ» Project Context
ezld was created as part of the [`rarsjs`](https://github.com/Alessandro-Salerno/rarsjs) project. Itβs meant to be a **learning tool** and **experimentation ground** for understanding the inner workings of static linking and ELF formats.
---
## βοΈ License
This project includes code from:
- [musl libc](https://musl.libc.org/)
- [tarman](https://github.com/Alessandro-Salerno/tarman)ezld is licensed under the [MIT License](LICENSE). Third-party code may have distinct copyright.
---
[contributors-shield]: https://img.shields.io/github/contributors/Alessandro-Salerno/ezld.svg?style=flat-square
[contributors-url]: https://github.com/Alessandro-Salerno/ezld/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/Alessandro-Salerno/ezld.svg?style=flat-square
[forks-url]: https://github.com/Alessandro-Salerno/ezld/network/members
[stars-shield]: https://img.shields.io/github/stars/Alessandro-Salerno/ezld.svg?style=flat-square
[stars-url]: https://github.com/Alessandro-Salerno/ezld/stargazers
[issues-shield]: https://img.shields.io/github/issues/Alessandro-Salerno/ezld.svg?style=flat-square
[issues-url]: https://github.com/Alessandro-Salerno/ezld/issues
[license-shield]: https://img.shields.io/github/license/Alessandro-Salerno/ezld.svg?style=flat-square
[license-url]: https://github.com/Alessandro-Salerno/ezld/blob/master/LICENSE.txt