8000 GitHub - vishruth-thimmaiah/zeld: A (WIP) linker built with zig, for x86-64 elf binaries.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

vishruth-thimmaiah/zeld

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zeld

A basic linker built with zig, that can link Elf64 files.

Tests

Project Naming and Inspiration
This project is named after The Legend of Zelda game series, and its aptly named protagonist, Link. In keeping with the common convention for linker names to end in 'ld'(examples: ld, lld, gold, mold), this project follows a similar pattern. Additionally, since it is written in Zig, the name begins with 'z'.

Note

This is a small project I made to learn the basics of linking ELF files.

Build:

zig build

Run:

zig build run -- <path to files>

Running the given examples

Generating relocatables

gcc -o examples/2/test.o examples/2/test.c -c
gcc -o examples/2/main.o examples/2/main.c -c
zig build run -- -r examples/2/test.o examples/2/main.o -o output.o
gcc -o output output.o       # Build an executable from the generated relocatable.

Generating executables

gcc -o examples/3/main.o examples/3/main.s -c
zig build run -- examples/3/main.o -o output

Using clang as your compiler should also work.

Running tests

zig build test

ELF specification

You can also check out /usr/include/elf.h.

Projects that I've referenced

About

A (WIP) linker built with zig, for x86-64 elf binaries.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages

0