{"id":20757809,"url":"https://github.com/sbz/elfdbg","last_synced_at":"2025-04-29T23:32:23.876Z","repository":{"id":147890379,"uuid":"255109643","full_name":"sbz/elfdbg","owner":"sbz","description":"Utility to determine if ELF binary is built with debug sections","archived":false,"fork":false,"pushed_at":"2022-04-09T07:41:11.000Z","size":37,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T12:22:30.817Z","etag":null,"topics":["debug-symbols","elf","freebsd","linux"],"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/sbz.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":"2020-04-12T15:14:19.000Z","updated_at":"2024-06-03T03:04:50.000Z","dependencies_parsed_at":"2023-05-27T20:30:15.645Z","dependency_job_id":null,"html_url":"https://github.com/sbz/elfdbg","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbz%2Felfdbg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbz%2Felfdbg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbz%2Felfdbg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbz%2Felfdbg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sbz","download_url":"https://codeload.github.com/sbz/elfdbg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251600047,"owners_count":21615628,"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":["debug-symbols","elf","freebsd","linux"],"created_at":"2024-11-17T09:45:20.174Z","updated_at":"2025-04-29T23:32:23.870Z","avatar_url":"https://github.com/sbz.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# elfdbg\n\n[![FreeBSD Build Status](https://api.cirrus-ci.com/github/sbz/elfdbg.svg?task=freebsd)](https://cirrus-ci.com/github/sbz/elfdbg)\n[![Linux Build Status](https://api.cirrus-ci.com/github/sbz/elfdbg.svg?task=linux)](https://cirrus-ci.com/github/sbz/elfdbg)\n\n## About\n\nThis project _elfdbg_ is a utility program to quickly identify if an ELF binary\nis built with [debug sections](https://en.wikipedia.org/wiki/Debug_symbol)\n\nDebug sections in ELF binary usually are generated using the `-g` flag with the\ncompiler. The compiler adds the new `.debug_*` sections in the binary.\n\nThe program is looking for the existence of sections with name starting with\n`.debug_` to determine if the binary has been built with debug information.\n\nThe [ELF][ELF] format is a well-known standard. ELF TIS reference specification\nis available [here][spec] and as a FreeBSD [elf(5)][man] man page.\n\n## Usage\n\nThis is intented to be used in shell script in order to avoid using file(1) and\nparsing the output like below:\n\n```shell\n`file /path/to/binary | awk '/debug_info/{print $2}'` != 'ELF'\n```\n\nTo determine if binary has been built with debug, use the following:\n\n```shell\nif elfdbg -q /path/to/binary; then\n        echo \"No symbols\"\n    else\n        echo \"Binary with debug symbols\"\nfi\n```\n\nOn FreeBSD, you can easily identify the binary packages with missing debug\nusing similar one-liner:\n\n```shell\npkg info -a -l|grep local/bin/|while read a; do echo $a: `elfdbg $a`; done\n```\n\n## Build and install\n\nThe Makefile use the standard BSD Makefile to build the program.\n\n```\nmake \u0026\u0026 sudo make install\n```\n\nIf your on Linux, use `make` also build using the GNU Makefile.\n\n## Test\n\nThe tests cases are implemented using the FreeBSD test suite framework with\n[kyua](https://github.com/jmmv/kyua) and [Kyuafile](./tests/Kyuafile).\n\n```\nmake test\n```\n\n## History\n\n* _2015_ I wrote this using libelf elf(3) and gelf(3) API\n  [f4b470b](https://github.com/sbz/elfdbg/commit/f4b470b)\n* _2020_ I rewrote this without relying on libelf API\n  [1960d10](https://github.com/sbz/elfdbg/commit/1960d10)\n\n[ELF]: https://en.wikipedia.org/wiki/Executable_and_Linkable_Format\n[spec]: http://refspecs.linuxbase.org/elf/elf.pdf\n[man]: https://www.freebsd.org/cgi/man.cgi?query=elf\u0026sektion=5\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbz%2Felfdbg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsbz%2Felfdbg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbz%2Felfdbg/lists"}