{"id":13667497,"url":"https://github.com/ksco/rvld","last_synced_at":"2025-05-15T22:33:46.322Z","repository":{"id":64371012,"uuid":"556578635","full_name":"ksco/rvld","owner":"ksco","description":"Learn how to write a minimal working linker from scratch","archived":false,"fork":false,"pushed_at":"2024-04-24T09:33:29.000Z","size":73,"stargazers_count":101,"open_issues_count":0,"forks_count":18,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-03T15:52:39.288Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ksco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-24T05:41:21.000Z","updated_at":"2025-02-10T16:58:37.000Z","dependencies_parsed_at":"2023-11-16T06:27:32.290Z","dependency_job_id":"aca27ed9-17f6-4fbd-be2d-157de46c6ccc","html_url":"https://github.com/ksco/rvld","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksco%2Frvld","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksco%2Frvld/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksco%2Frvld/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksco%2Frvld/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ksco","download_url":"https://codeload.github.com/ksco/rvld/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254433332,"owners_count":22070457,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T07:00:38.461Z","updated_at":"2025-05-15T22:33:41.308Z","avatar_url":"https://github.com/ksco.png","language":"Go","readme":"# rvld\n\nEnglish | [中文版](README_cn.md)\n\nrvld is a minimal linker implementation for the RV64GC architecture, mainly for educational purposes. rvld mostly copied the source code of [rui314/mold](https://github.com/rui314/mold), so it is a derivative work of mold, and is also distributed under the [GNU AGPL v3 LICENSE](LICENSE).\n\nrvld can statically link a simple C program (such as the Hello world in the example below) and produce a runnable binary.\n\n```bash\ncat \u003c\u003cEOF | $CC -o a.o -c -xc -static -\n#include \u003cstdio.h\u003e\nint main() {\n  printf(\"Hello, World.\\n\");\n  return 0;\n}\nEOF\n\n$CC -B. -s -static a.o -o out\nqemu-riscv64 out\n\n# Hello, World.\n```\n\nrvld is only about 2000 lines of Go code and has no external dependencies other than the standard library. Based on this project, PLCT Lab launched an open course [Implementing a Linker from Scratch](https://ksco.cc/rvld). The course is in Chinese.\n\n## Note\n\nrvld may not be suitable for higher version toolchains, please consider using Docker environment for easier reproduction.\n\n```bash\ndocker run -u root --volume ~/Developer:/code -it golang:bullseye\n\n# Inside the docker container:\napt update\napt install -y gcc-10-riscv64-linux-gnu qemu-user\nln -sf /usr/bin/riscv64-linux-gnu-gcc-10 /usr/bin/riscv64-linux-gnu-gcc\n```\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksco%2Frvld","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fksco%2Frvld","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksco%2Frvld/lists"}