Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
ELFファイルのダンプ結果
$ ./dump
Elf file header(equivalent as readelf -h)
ehdr->e_ident = 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
ehdr->e_type = 2(0x2)
ehdr->e_machine = 62(0x3e)
ehdr->e_version = 1(0x1)
ehdr->e_entry = 4195456(0x400480)
ehdr->e_phoff = 64(0x40)
ehdr->e_shoff = 6056(0x17a8)
ehdr->e_flags = 0(0x0)
ehdr->e_ehsize = 64(0x40)
ehdr->e_phentsize = 56(0x38)
ehdr->e_phnum = 10(0xa)
ehdr->e_shentsize = 64(0x40)
ehdr->e_shnum = 29(0x1d)
ehdr->e_shstrndx = 26(0x1a)
Program header(equivalent as readelf -l)
phdr->p_type = 6(0x6)
phdr->p_flags = 5(0x5)
phdr->p_offset = 64(0x40)
phdr->p_vaddr = 4194368(0x400040)
phdr->p_paddr = 4194368(0x400040)
phdr->p_filesz = 560(0x230)
phdr->p_memsz = 560(0x230)
phdr->p_align = 8(0x8)
phdr->p_type = 3(0x3)
phdr->p_flags = 4(0x4)
phdr->p_offset = 624(0x270)
phdr->p_vaddr = 4194928(0x400270)
phdr->p_paddr = 4194928(0x400270)
phdr->p_filesz = 28(0x1c)
phdr->p_memsz = 28(0x1c)
phdr->p_align = 1(0x1)
phdr->p_type = 1(0x1)
phdr->p_flags = 5(0x5)
phdr->p_offset = 0(0x0)
phdr->p_vaddr = 4194304(0x400000)
phdr->p_paddr = 4194304(0x400000)
phdr->p_filesz = 1828(0x724)
phdr->p_memsz = 1828(0x724)
phdr->p_align = 2097152(0x200000)
phdr->p_type = 1(0x1)
phdr->p_flags = 6(0x6)
phdr->p_offset = 3600(0xe10)
phdr->p_vaddr = 6295056(0x600e10)
phdr->p_paddr = 6295056(0x600e10)
phdr->p_filesz = 560(0x230)
phdr->p_memsz = 568(0x238)
phdr->p_align = 2097152(0x200000)
phdr->p_type = 2(0x2)
phdr->p_flags = 6(0x6)
phdr->p_offset = 3624(0xe28)
phdr->p_vaddr = 6295080(0x600e28)
phdr->p_paddr = 6295080(0x600e28)
phdr->p_filesz = 464(0x1d0)
phdr->p_memsz = 464(0x1d0)
phdr->p_align = 8(0x8)
phdr->p_type = 4(0x4)
phdr->p_flags = 4(0x4)
phdr->p_offset = 652(0x28c)
phdr->p_vaddr = 4194956(0x40028c)
phdr->p_paddr = 4194956(0x40028c)
phdr->p_filesz = 32(0x20)
phdr->p_memsz = 32(0x20)
phdr->p_align = 4(0x4)
phdr->p_type = 1685382480(0x6474e550)
phdr->p_flags = 4(0x4)
phdr->p_offset = 1540(0x604)
phdr->p_vaddr = 4195844(0x400604)
phdr->p_paddr = 4195844(0x400604)
phdr->p_filesz = 52(0x34)
phdr->p_memsz = 52(0x34)
phdr->p_align = 4(0x4)
phdr->p_type = 1685382481(0x6474e551)
phdr->p_flags = 6(0x6)
phdr->p_offset = 0(0x0)
phdr->p_vaddr = 0(0x0)
phdr->p_paddr = 0(0x0)
phdr->p_filesz = 0(0x0)
phdr->p_memsz = 0(0x0)
phdr->p_align = 16(0x10)
phdr->p_type = 1685382482(0x6474e552)
phdr->p_flags = 4(0x4)
phdr->p_offset = 3600(0xe10)
phdr->p_vaddr = 6295056(0x600e10)
phdr->p_paddr = 6295056(0x600e10)
phdr->p_filesz = 496(0x1f0)
phdr->p_memsz = 496(0x1f0)
phdr->p_align = 1(0x1)
phdr->p_type = 1694766464(0x65041580)
phdr->p_flags = 10240(0x2800)
phdr->p_offset = 0(0x0)
phdr->p_vaddr = 0(0x0)
phdr->p_paddr = 0(0x0)
phdr->p_filesz = 0(0x0)
phdr->p_memsz = 0(0x0)
phdr->p_align = 8(0x8)
Section header(equivalent as readelf -s)
shdr->sh_name = 0(0x0)
shdr->sh_type = 0(0x0)
shdr->sh_flags = 0(0x0)
shdr->sh_addr = 0(0x0)
shdr->sh_offset = 0(0x0)
shdr->sh_size = 0(0x0)
shdr->sh_link = 0(0x0)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 0(0x0)
shdr->sh_entsize = 0(0x0)
shdr->sh_name = 27(0x1b)
shdr->sh_type = 1(0x1)
shdr->sh_flags = 2(0x2)
shdr->sh_addr = 4194928(0x400270)
shdr->sh_offset = 624(0x270)
shdr->sh_size = 28(0x1c)
shdr->sh_link = 0(0x0)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 1(0x1)
shdr->sh_entsize = 0(0x0)
shdr->sh_name = 35(0x23)
shdr->sh_type = 7(0x7)
shdr->sh_flags = 2(0x2)
shdr->sh_addr = 4194956(0x40028c)
shdr->sh_offset = 652(0x28c)
shdr->sh_size = 32(0x20)
shdr->sh_link = 0(0x0)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 4(0x4)
shdr->sh_entsize = 0(0x0)
shdr->sh_name = 49(0x31)
shdr->sh_type = 1879048182(0x6ffffff6)
shdr->sh_flags = 2(0x2)
shdr->sh_addr = 4194992(0x4002b0)
shdr->sh_offset = 688(0x2b0)
shdr->sh_size = 28(0x1c)
shdr->sh_link = 4(0x4)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 8(0x8)
shdr->sh_entsize = 0(0x0)
shdr->sh_name = 59(0x3b)
shdr->sh_type = 11(0xb)
shdr->sh_flags = 2(0x2)
shdr->sh_addr = 4195024(0x4002d0)
shdr->sh_offset = 720(0x2d0)
shdr->sh_size = 96(0x60)
shdr->sh_link = 5(0x5)
shdr->sh_info = 1(0x1)
shdr->sh_addralign = 8(0x8)
shdr->sh_entsize = 24(0x18)
shdr->sh_name = 67(0x43)
shdr->sh_type = 3(0x3)
shdr->sh_flags = 2(0x2)
shdr->sh_addr = 4195120(0x400330)
shdr->sh_offset = 816(0x330)
shdr->sh_size = 61(0x3d)
shdr->sh_link = 0(0x0)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 1(0x1)
shdr->sh_entsize = 0(0x0)
shdr->sh_name = 75(0x4b)
shdr->sh_type = 1879048191(0x6fffffff)
shdr->sh_flags = 2(0x2)
shdr->sh_addr = 4195182(0x40036e)
shdr->sh_offset = 878(0x36e)
shdr->sh_size = 8(0x8)
shdr->sh_link = 4(0x4)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 2(0x2)
shdr->sh_entsize = 2(0x2)
shdr->sh_name = 88(0x58)
shdr->sh_type = 1879048190(0x6ffffffe)
shdr->sh_flags = 2(0x2)
shdr->sh_addr = 4195192(0x400378)
shdr->sh_offset = 888(0x378)
shdr->sh_size = 32(0x20)
shdr->sh_link = 5(0x5)
shdr->sh_info = 1(0x1)
shdr->sh_addralign = 8(0x8)
shdr->sh_entsize = 0(0x0)
shdr->sh_name = 103(0x67)
shdr->sh_type = 4(0x4)
shdr->sh_flags = 2(0x2)
shdr->sh_addr = 4195224(0x400398)
shdr->sh_offset = 920(0x398)
shdr->sh_size = 24(0x18)
shdr->sh_link = 4(0x4)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 8(0x8)
shdr->sh_entsize = 24(0x18)
shdr->sh_name = 113(0x71)
shdr->sh_type = 4(0x4)
shdr->sh_flags = 66(0x42)
shdr->sh_addr = 4195248(0x4003b0)
shdr->sh_offset = 944(0x3b0)
shdr->sh_size = 72(0x48)
shdr->sh_link = 4(0x4)
shdr->sh_info = 11(0xb)
shdr->sh_addralign = 8(0x8)
shdr->sh_entsize = 24(0x18)
shdr->sh_name = 123(0x7b)
shdr->sh_type = 1(0x1)
shdr->sh_flags = 6(0x6)
shdr->sh_addr = 4195320(0x4003f8)
shdr->sh_offset = 1016(0x3f8)
shdr->sh_size = 26(0x1a)
shdr->sh_link = 0(0x0)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 4(0x4)
shdr->sh_entsize = 0(0x0)
shdr->sh_name = 118(0x76)
shdr->sh_type = 1(0x1)
shdr->sh_flags = 6(0x6)
shdr->sh_addr = 4195360(0x400420)
shdr->sh_offset = 1056(0x420)
shdr->sh_size = 64(0x40)
shdr->sh_link = 0(0x0)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 16(0x10)
shdr->sh_entsize = 16(0x10)
shdr->sh_name = 129(0x81)
shdr->sh_type = 1(0x1)
shdr->sh_flags = 6(0x6)
shdr->sh_addr = 4195424(0x400460)
shdr->sh_offset = 1120(0x460)
shdr->sh_size = 385(0x181)
shdr->sh_link = 0(0x0)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 16(0x10)
shdr->sh_entsize = 0(0x0)
shdr->sh_name = 135(0x87)
shdr->sh_type = 1(0x1)
shdr->sh_flags = 6(0x6)
shdr->sh_addr = 4195812(0x4005e4)
shdr->sh_offset = 1508(0x5e4)
shdr->sh_size = 9(0x9)
shdr->sh_link = 0(0x0)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 4(0x4)
shdr->sh_entsize = 0(0x0)
shdr->sh_name = 141(0x8d)
shdr->sh_type = 1(0x1)
shdr->sh_flags = 2(0x2)
shdr->sh_addr = 4195824(0x4005f0)
shdr->sh_offset = 1520(0x5f0)
shdr->sh_size = 18(0x12)
shdr->sh_link = 0(0x0)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 4(0x4)
shdr->sh_entsize = 0(0x0)
shdr->sh_name = 149(0x95)
shdr->sh_type = 1(0x1)
shdr->sh_flags = 2(0x2)
shdr->sh_addr = 4195844(0x400604)
shdr->sh_offset = 1540(0x604)
shdr->sh_size = 52(0x34)
shdr->sh_link = 0(0x0)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 4(0x4)
shdr->sh_entsize = 0(0x0)
shdr->sh_name = 163(0xa3)
shdr->sh_type = 1(0x1)
shdr->sh_flags = 2(0x2)
shdr->sh_addr = 4195896(0x400638)
shdr->sh_offset = 1592(0x638)
shdr->sh_size = 236(0xec)
shdr->sh_link = 0(0x0)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 8(0x8)
shdr->sh_entsize = 0(0x0)
shdr->sh_name = 173(0xad)
shdr->sh_type = 14(0xe)
shdr->sh_flags = 3(0x3)
shdr->sh_addr = 6295056(0x600e10)
shdr->sh_offset = 3600(0xe10)
shdr->sh_size = 8(0x8)
shdr->sh_link = 0(0x0)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 8(0x8)
shdr->sh_entsize = 0(0x0)
shdr->sh_name = 185(0xb9)
shdr->sh_type = 15(0xf)
shdr->sh_flags = 3(0x3)
shdr->sh_addr = 6295064(0x600e18)
shdr->sh_offset = 3608(0xe18)
shdr->sh_size = 8(0x8)
shdr->sh_link = 0(0x0)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 8(0x8)
shdr->sh_entsize = 0(0x0)
shdr->sh_name = 197(0xc5)
shdr->sh_type = 1(0x1)
shdr->sh_flags = 3(0x3)
shdr->sh_addr = 6295072(0x600e20)
shdr->sh_offset = 3616(0xe20)
shdr->sh_size = 8(0x8)
shdr->sh_link = 0(0x0)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 8(0x8)
shdr->sh_entsize = 0(0x0)
shdr->sh_name = 202(0xca)
shdr->sh_type = 6(0x6)
shdr->sh_flags = 3(0x3)
shdr->sh_addr = 6295080(0x600e28)
shdr->sh_offset = 3624(0xe28)
shdr->sh_size = 464(0x1d0)
shdr->sh_link = 5(0x5)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 8(0x8)
shdr->sh_entsize = 16(0x10)
shdr->sh_name = 211(0xd3)
shdr->sh_type = 1(0x1)
shdr->sh_flags = 3(0x3)
shdr->sh_addr = 6295544(0x600ff8)
shdr->sh_offset = 4088(0xff8)
shdr->sh_size = 8(0x8)
shdr->sh_link = 0(0x0)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 8(0x8)
shdr->sh_entsize = 8(0x8)
shdr->sh_name = 216(0xd8)
shdr->sh_type = 1(0x1)
shdr->sh_flags = 3(0x3)
shdr->sh_addr = 6295552(0x601000)
shdr->sh_offset = 4096(0x1000)
shdr->sh_size = 48(0x30)
shdr->sh_link = 0(0x0)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 8(0x8)
shdr->sh_entsize = 8(0x8)
shdr->sh_name = 225(0xe1)
shdr->sh_type = 1(0x1)
shdr->sh_flags = 3(0x3)
shdr->sh_addr = 6295600(0x601030)
shdr->sh_offset = 4144(0x1030)
shdr->sh_size = 16(0x10)
shdr->sh_link = 0(0x0)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 8(0x8)
shdr->sh_entsize = 0(0x0)
shdr->sh_name = 231(0xe7)
shdr->sh_type = 8(0x8)
shdr->sh_flags = 3(0x3)
shdr->sh_addr = 6295616(0x601040)
shdr->sh_offset = 4160(0x1040)
shdr->sh_size = 8(0x8)
shdr->sh_link = 0(0x0)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 1(0x1)
shdr->sh_entsize = 0(0x0)
shdr->sh_name = 236(0xec)
shdr->sh_type = 1(0x1)
shdr->sh_flags = 48(0x30)
shdr->sh_addr = 0(0x0)
shdr->sh_offset = 4160(0x1040)
shdr->sh_size = 42(0x2a)
shdr->sh_link = 0(0x0)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 1(0x1)
shdr->sh_entsize = 1(0x1)
shdr->sh_name = 17(0x11)
shdr->sh_type = 3(0x3)
shdr->sh_flags = 0(0x0)
shdr->sh_addr = 0(0x0)
shdr->sh_offset = 4202(0x106a)
shdr->sh_size = 245(0xf5)
shdr->sh_link = 0(0x0)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 1(0x1)
shdr->sh_entsize = 0(0x0)
shdr->sh_name = 1(0x1)
shdr->sh_type = 2(0x2)
shdr->sh_flags = 0(0x0)
shdr->sh_addr = 0(0x0)
shdr->sh_offset = 4448(0x1160)
shdr->sh_size = 1248(0x4e0)
shdr->sh_link = 28(0x1c)
shdr->sh_info = 32(0x20)
shdr->sh_addralign = 8(0x8)
shdr->sh_entsize = 24(0x18)
shdr->sh_name = 9(0x9)
shdr->sh_type = 3(0x3)
shdr->sh_flags = 0(0x0)
shdr->sh_addr = 0(0x0)
shdr->sh_offset = 5696(0x1640)
shdr->sh_size = 358(0x166)
shdr->sh_link = 0(0x0)
shdr->sh_info = 0(0x0)
shdr->sh_addralign = 1(0x1)
shdr->sh_entsize = 0(0x0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment