{"id":13739734,"url":"https://github.com/kubkon/zelf","last_synced_at":"2025-03-22T15:30:48.081Z","repository":{"id":147484785,"uuid":"406455772","full_name":"kubkon/zelf","owner":"kubkon","description":"Zig's ELF parser utility","archived":false,"fork":false,"pushed_at":"2024-04-26T08:03:17.000Z","size":101,"stargazers_count":18,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-05-01T22:15:53.330Z","etag":null,"topics":["elf","zig","zig-package"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kubkon.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":"2021-09-14T17:06:40.000Z","updated_at":"2024-07-25T10:09:37.809Z","dependencies_parsed_at":"2024-01-06T11:21:45.730Z","dependency_job_id":"5f55b68e-aae6-46ee-9f96-44e78fb6d872","html_url":"https://github.com/kubkon/zelf","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/kubkon%2Fzelf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubkon%2Fzelf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubkon%2Fzelf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubkon%2Fzelf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kubkon","download_url":"https://codeload.github.com/kubkon/zelf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244978423,"owners_count":20541854,"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":["elf","zig","zig-package"],"created_at":"2024-08-03T04:00:36.999Z","updated_at":"2025-03-22T15:30:47.486Z","avatar_url":"https://github.com/kubkon.png","language":"Zig","funding_links":[],"categories":["Applications"],"sub_categories":[],"readme":"# zelf\n\nZig's ELF parsing utility - a replacement (maybe someday) utility for `readelf` written in Zig.\n\n## Usage\n\n```\nUsage: zelf [options] file\n\nGeneral Options:\n-a, --all                        Equivalent of having all flags on\n-g, --section-groups             Display the section groups\n-h, --file-header                Display ELF file header\n-l, --program-headers            Display program headers (if present)\n-S, --section-headers            Display section headers\n-s, --symbols                    Display symbol table\n    --dyn-syms                   Display the dynamic symbol table\n-r, --relocs                     Display relocations (if present)\n-d, --dynamic                    Display the dynamic section (if present)\n--initializers                   Display table(s) of initializers/finalizers (if present)\n-p, --string-dump=\u003cnumber|name\u003e  Dump the contents of section \u003cnumber|name\u003e as strings\n-V, --version-info               Display the version sections (if present)\n-W, --wide                       Do not shorten the names if too wide\n-x, --hex-dump=\u003cnumber|name\u003e     Dump the contents of section \u003cnumber|name\u003e as bytes\n--help                           Display this help and exit\n```\n\nCurrently supported flags. More to come.\n\nTypical output will look something like this.\n\n```\n\u003e zelf -a main.o\nELF Header:\n  Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00\n  Class:                             ELF64\n  Data:                              2's complement, little endian\n  Version:                           1 (current)\n  OS/ABI:                            UNIX - System V\n  ABI Version:                       0\n  Type:                              REL (Relocatable file)\n  Machine:                           Advanced Micro Devices X86-64\n  Version:                           0x1\n  Entry point address:               0x0\n  Start of program headers:          0 (bytes into file)\n  Start of section headers:          28208 (bytes into file)\n  Flags:                             0x0\n  Size of this header:               64 (bytes)\n  Size of program headers:           0 (bytes)\n  Number of program headers:         0\n  Size of section headers:           64 (bytes)\n  Number of section headers:         23\n  Section header string table index: 22\n\nThere are 23 section headers, starting at offset 0x6e30:\n\nSection Headers:\n  [Nr]  Name              Type              Address           Offset\n        Size              EntSize           Flags  Link  Info  Align\n  [ 0]                    NULL              0000000000000000  0000000000000000\n        0000000000000000  0000000000000000            0     0     0\n  [ 1]  .note.gnu.pr[..]  NOTE              0000000000000000  0000000000000040\n        0000000000000040  0000000000000000  A         0     0     8\n  [ 2]  .note.ABI-tag     NOTE              0000000000000000  0000000000000080\n        0000000000000020  0000000000000000  A         0     0     4\n  [ 3]  .text             PROGBITS          0000000000000000  00000000000000a0\n        0000000000000031  0000000000000000  AX        0     0    16\n  [ 4]  .rela.text        RELA              0000000000000000  0000000000000480\n        0000000000000030  0000000000000018  I        20     3     8\n  [ 5]  .rodata.cst4      PROGBITS          0000000000000000  00000000000000d4\n        0000000000000004  0000000000000004  AM        0     0     4\n  [ 6]  .eh_frame         PROGBITS          0000000000000000  00000000000000d8\n        000000000000005c  0000000000000000  A         0     0     8\n  [ 7]  .rela.eh_frame    RELA              0000000000000000  00000000000004b0\n        0000000000000030  0000000000000018  I        20     6     8\n  [ 8]  .data             PROGBITS          0000000000000000  0000000000000134\n        0000000000000004  0000000000000000  WA        0     0     1\n  [ 9]  .bss              NOBITS            0000000000000000  0000000000000138\n        0000000000000000  0000000000000000  WA        0     0     1\n  [10]  .comment          PROGBITS          0000000000000000  0000000000000138\n        0000000000000036  0000000000000001  MS        0     0     1\n  [11]  .note.GNU-stack   PROGBITS          0000000000000000  000000000000016e\n        0000000000000000  0000000000000000            0     0     1\n  [12]  .debug_aranges    PROGBITS          0000000000000000  00000000000004e0\n        000000000000003b  0000000000000000  C         0     0     8\n  [13]  .rela.debug_[..]  RELA              0000000000000000  0000000000000520\n        0000000000000090  0000000000000018  I        20    12     8\n  [14]  .debug_info       PROGBITS          0000000000000000  00000000000005b0\n        00000000000013c4  0000000000000000  C         0     0     8\n  [15]  .rela.debug_info  RELA              0000000000000000  0000000000001978\n        00000000000041d0  0000000000000018  I        20    14     8\n  [16]  .debug_abbrev     PROGBITS          0000000000000000  0000000000005b48\n        00000000000001ac  0000000000000000  C         0     0     8\n  [17]  .debug_line       PROGBITS          0000000000000000  0000000000005cf8\n        0000000000000313  0000000000000000  C         0     0     8\n  [18]  .rela.debug_line  RELA              0000000000000000  0000000000006010\n        0000000000000030  0000000000000018  I        20    17     8\n  [19]  .debug_str        PROGBITS          0000000000000000  0000000000006040\n        0000000000000d1a  0000000000000001  MSC       0     0     8\n  [20]  .symtab           SYMTAB            0000000000000000  0000000000000170\n        0000000000000288  0000000000000018           21    19     8\n  [21]  .strtab           STRTAB            0000000000000000  00000000000003f8\n        0000000000000088  0000000000000000            0     0     1\n  [22]  .shstrtab         STRTAB            0000000000000000  0000000000006d5a\n        00000000000000d6  0000000000000000            0     0     1\nKey to Flags:\n  W (write), A (alloc), X (execute), M (merge), S (strings), I (info),\n  L (link order), O (extra OS processing required), G (group), T (TLS),\n  C (compressed), x (unknown), o (OS specific), E (exclude),\n  D (mbind), l (large), p (processor specific)\n\nThere are no program headers in this file.\n\nRelocation section '.rela.text' at offset 0x480 contains 2 entries:\n  Offset        Info            Type                    Sym. Value  Sym. Name + Addend\n000000000017 00150000002a R_X86_64_REX_GOTPCRELX   0000000000000000 main - 4\n00000000001d 001900000029 R_X86_64_GOTPCRELX       0000000000000000 __libc_start_main - 4\n\nRelocation section '.rela.eh_frame' at offset 0x4b0 contains 2 entries:\n  Offset        Info            Type                    Sym. Value  Sym. Name + Addend\n000000000020 000300000002 R_X86_64_PC32            0000000000000000 .text + 0\n000000000050 000300000002 R_X86_64_PC32            0000000000000000 .text + 30\n\nRelocation section '.rela.debug_aranges' at offset 0x520 contains 6 entries:\n  Offset        Info            Type                    Sym. Value  Sym. Name + Addend\n000000000006 000b0000000a R_X86_64_32              0000000000000000 .debug_info + 0\n000000000010 000300000001 R_X86_64_64              0000000000000000 .text + 0\n000000000036 000b0000000a R_X86_64_32              0000000000000000 .debug_info + 2e\n000000000056 000b0000000a R_X86_64_32              0000000000000000 .debug_info + af4\n000000000076 000b0000000a R_X86_64_32              0000000000000000 .debug_info + b34\n000000000080 000300000001 R_X86_64_64              0000000000000000 .text + 30\n\nSymbol table '.symtab' contains 27 entries:\n  Num:            Value  Size Type    Bind   Vis      Ndx   Name\n    0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND   \n    1: 0000000000000000     0 SECTION LOCAL  DEFAULT  1     \n    2: 0000000000000000     0 SECTION LOCAL  DEFAULT  2     \n    3: 0000000000000000     0 SECTION LOCAL  DEFAULT  3     \n    4: 0000000000000000     0 SECTION LOCAL  DEFAULT  5     \n    5: 0000000000000000     0 SECTION LOCAL  DEFAULT  6     \n    6: 0000000000000000     0 SECTION LOCAL  DEFAULT  8     \n    7: 0000000000000000     0 SECTION LOCAL  DEFAULT  9     \n    8: 0000000000000000     0 SECTION LOCAL  DEFAULT  10    \n    9: 0000000000000000     0 SECTION LOCAL  DEFAULT  11    \n   10: 0000000000000000     0 SECTION LOCAL  DEFAULT  12    \n   11: 0000000000000000     0 SECTION LOCAL  DEFAULT  14    \n   12: 0000000000000000     0 SECTION LOCAL  DEFAULT  16    \n   13: 0000000000000000     0 SECTION LOCAL  DEFAULT  17    \n   14: 0000000000000000     0 SECTION LOCAL  DEFAULT  19    \n   15: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS   abi-note.c\n   16: 0000000000000000    32 OBJECT  LOCAL  DEFAULT  2     __abi_tag\n   17: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS   init.c\n   18: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS   static-reloc.c\n   19: 0000000000000030     1 FUNC    GLOBAL UNKNOWN  3     _dl_relocate_static_pie\n   20: 0000000000000000    34 FUNC    GLOBAL DEFAULT  3     _start\n   21: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND   main\n   22: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  8     data_start\n   23: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND   _GLOBAL_OFFSET_TABLE_\n   24: 0000000000000000     4 OBJECT  GLOBAL DEFAULT  5     _IO_stdin_used\n   25: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND   __libc_start_main\n   26: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  8     __data_start\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubkon%2Fzelf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkubkon%2Fzelf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubkon%2Fzelf/lists"}