{"id":17224548,"url":"https://github.com/tartanllama/dltrace","last_synced_at":"2025-04-14T00:44:30.116Z","repository":{"id":146923759,"uuid":"96708006","full_name":"TartanLlama/dltrace","owner":"TartanLlama","description":"A demonstration of tracing dynamic library loading and unloading on Linux.","archived":false,"fork":false,"pushed_at":"2017-07-15T17:35:49.000Z","size":10,"stargazers_count":17,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T17:38:16.560Z","etag":null,"topics":["debugger","dynamic-loading","linux","tracing"],"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/TartanLlama.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-09T19:58:48.000Z","updated_at":"2024-09-03T13:42:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"125e1752-982d-4d0b-a4e9-3f3c5b078336","html_url":"https://github.com/TartanLlama/dltrace","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/TartanLlama%2Fdltrace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TartanLlama%2Fdltrace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TartanLlama%2Fdltrace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TartanLlama%2Fdltrace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TartanLlama","download_url":"https://codeload.github.com/TartanLlama/dltrace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804721,"owners_count":21164127,"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":["debugger","dynamic-loading","linux","tracing"],"created_at":"2024-10-15T04:11:22.030Z","updated_at":"2025-04-14T00:44:30.095Z","avatar_url":"https://github.com/TartanLlama.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dltrace\nA demonstration of tracing dynamic library loading and unloading on Linux.\n\n### Background\n\n- The dynamic linker mainains a rendezvous structure, which helps the debugger trace what libraries have been loaded or unloaded.\n- This structure is stored where the  `.dynamic` section of the ELF file is loaded from the executable.\n- It maintains a linked list of shared library descriptors, along with a pointer to a function which is called whenever the linked list is updated.\n- The rendezvous structure is initialized before the execution of the program begins.\n\n### Algorithm\n- The tracer looks up the entry point of the program in the ELF header (or it could use the auxillary vector stored in `/proc/\u003cpid\u003e/aux`)\n- The tracer places a breakpoint on the entry point of the program and begins execution.\n- When the breakpoint is hit, the address of the rendezvous structure is found by looking up the load address of `.dynamic` in the ELF file.\n- The rendezvous structure is examined to get the list of currently loaded libraries.\n- A breakpoint is set on the linker update function.\n- Whenever the breakpoint is hit, the list is updated.\n- The tracer infinitely loops, continuing the program and waiting for a signal until the tracee signals that it has exited.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftartanllama%2Fdltrace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftartanllama%2Fdltrace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftartanllama%2Fdltrace/lists"}