{"id":24762315,"url":"https://github.com/ferdi265/dynamic-loader","last_synced_at":"2025-07-26T17:12:23.142Z","repository":{"id":84059828,"uuid":"196735879","full_name":"Ferdi265/dynamic-loader","owner":"Ferdi265","description":"A simple Linux dynamic loader capable of loading simple binaries using simple shared libraries (no glibc support)","archived":false,"fork":false,"pushed_at":"2023-12-30T10:30:37.000Z","size":44,"stargazers_count":19,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-07-24T00:13:56.278Z","etag":null,"topics":["c","cmake","dynamic-linking","dynamic-loading","linux","musl","systems-programming"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ferdi265.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-07-13T15:17:15.000Z","updated_at":"2024-06-23T12:45:54.000Z","dependencies_parsed_at":"2023-10-04T01:10:26.861Z","dependency_job_id":null,"html_url":"https://github.com/Ferdi265/dynamic-loader","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/Ferdi265%2Fdynamic-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ferdi265%2Fdynamic-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ferdi265%2Fdynamic-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ferdi265%2Fdynamic-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ferdi265","download_url":"https://codeload.github.com/Ferdi265/dynamic-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236075212,"owners_count":19090892,"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":["c","cmake","dynamic-linking","dynamic-loading","linux","musl","systems-programming"],"created_at":"2025-01-28T19:29:38.805Z","updated_at":"2025-07-26T17:12:23.129Z","avatar_url":"https://github.com/Ferdi265.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dynamic-loader\n\nA simple dynamic library loader for Linux capable of loading simple binaries using simple shared libraries.\n\n## Features\n\n- Actually readable codebase for a dynamic loader\n- Loads simple shared objects (no glibc or musl support\\*)\n- Calls initializers and finalizers\n- Performs relocations at load-time (no lazy loading supported yet)\n- Supports `dlopen()`, `dlsym()`, and `dlclose()`\n- no support for threads or TLS, though rudimentary thread-safety is supported\n  in the loader\n\n\\* glibc and musl provide their own dynamic library loader that they expect to\nbe loaded with:\n- `ld-linux-x86_64.so.2` (aka `ld.so`) for glibc\n- `ld-musl-x86_64.so.1` (a symlink to musl's `libc.so`) for musl\n\n## Dependencies\n\n- `libmusl.a` and `musl-gcc` (arch: `musl`, debian: `musl musl-tools`)\n- `elf.h` (arch: part of `base`, debian: `libelf-dev`)\n\n## Building\n\n- `cmake -B build`\n- `cd build`\n- `make`\n- run `build/loader/libloader.so` or any of the binaries in `build/tests/bin/`\n\n## Resources\n\nThis loader was written mostly by using specifications from\n[refspecs.linuxbase.org](https://refspecs.linuxbase.org/), mainly the\n[ELF spec](https://refspecs.linuxfoundation.org/elf/elf.pdf) and the\n[x86\\_64 processor supplement](https://refspecs.linuxfoundation.org/elf/x86_64-abi-0.95.pdf).\n\nFor some parts of the early loader startup code (mainly the code in `crt/`), I\nalso read the source code of [musl libc](https://musl-libc.org/) to get a better\nunderstanding of typical ways to handle early loader init. To understand ELF\nsymbol hash tables, I used multiple sources, but\n[this blog post on flagpenguin.me](https://flapenguin.me/elf-dt-hash) was most\nuseful.\n\n## License\n\nThis project is licensed under the MIT License (SPDX\n[MIT](https://spdx.org/licenses/MIT.html)). The full\nlicense text can also be found in the [LICENSE](/LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferdi265%2Fdynamic-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fferdi265%2Fdynamic-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferdi265%2Fdynamic-loader/lists"}