{"id":28320924,"url":"https://github.com/umaumax/ldhookgen","last_synced_at":"2025-08-16T18:03:47.576Z","repository":{"id":154771407,"uuid":"273668813","full_name":"umaumax/ldhookgen","owner":"umaumax","description":null,"archived":false,"fork":false,"pushed_at":"2020-06-24T13:40:49.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-25T12:12:46.132Z","etag":null,"topics":["asm","cpp","ld-preload","tracer"],"latest_commit_sha":null,"homepage":null,"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/umaumax.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}},"created_at":"2020-06-20T08:29:22.000Z","updated_at":"2022-01-09T14:41:52.000Z","dependencies_parsed_at":"2023-05-20T18:15:33.436Z","dependency_job_id":null,"html_url":"https://github.com/umaumax/ldhookgen","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.125,"last_synced_commit":"4b3263e734ad8d457df774b6bf805f043be6dd46"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umaumax%2Fldhookgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umaumax%2Fldhookgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umaumax%2Fldhookgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umaumax%2Fldhookgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umaumax","download_url":"https://codeload.github.com/umaumax/ldhookgen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umaumax%2Fldhookgen/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":257449747,"owners_count":22547751,"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":["asm","cpp","ld-preload","tracer"],"created_at":"2025-05-25T12:12:45.510Z","updated_at":"2025-06-14T00:03:59.053Z","avatar_url":"https://github.com/umaumax.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ldhookgen\n\nauto generator functions for hook by `LD_PRELOAD`\n\nyou can generate functions from only symbol names (without arg infos)\n\nfor `x86_64` only\n\n## how to build\nrun build command at test directory\n```\ncp test/libtrace_test .\n./auto_gen.sh\n```\n\n## how to run\n```\nLD_LIBRARY_PATH=. ./libtrace_test\nLD_LIBRARY_PATH=. LD_PRELOAD=./libauto_gen.so ./libtrace_test\n```\n\n## 開発のステップ\n* `test`のディレクトリで手動でプログラムを変更して検証し，OKと判断したら，テンプレートの方にそれを反映し，自動生成できるようにする\n\n## memo\n* `nm`でシンボル情報が取れない場合は`objdump -R`でシンボル情報がとれる\n\n## TODO\n* post call hook対応\n  * フックした関数の実行時間取得\n* ログ出力\n  * 関数呼び出しのindent\n  * TID\n* シンボルの変数と関数の区別をする方法の調査\n\n## ltraceとの比較\n* `ltrace`では`LD_PRELOAD`ではなく`ptrace`を利用しているため仕組みが異なる\n  * `plt`を利用しないバインド方法では`ltrace`ではトレースができない(e.g. rustバイナリの`malloc`)\n* `ltrace`コマンドが存在しない環境でも利用可能\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumaumax%2Fldhookgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumaumax%2Fldhookgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumaumax%2Fldhookgen/lists"}