colorful rat Ratfactor.com > Dave's Repos

mez

A utility for ELF header experiments written in Zig
git clone http://ratfactor.com/repos/mez/mez.git

mez/hello.txt

Download raw file: hello.txt

1 +-[ELF Header]------------------------------------------+ 2 | 7F E L F 01 01 01 00 00 00 00 00 00 00 00 00 02 00 | 3 | 03 00 01 00 00 00 00 90 04 08 34 00 00 00 D0 20 00 00 | 4 | 00 00 00 00 34 00 20 00 03 00 28 00 06 00 05 00 /-----+ 5 +--+---------------------------------------------/ 6 +-- Entry point address: 0x08049000 7 +-- Program header file offset: 0x34 8 +-- Program header size: 32 (0x20) 9 \-- Program header count: 3 10 | 11 +-- Program Header 0 at 0x34, type: PT_LOAD 12 +-- Program Header 1 at 0x54, type: PT_LOAD 13 +-- Program Header 2 at 0x74, type: PT_LOAD 14 15 +-[Program Header 0]------------------------------+ 16 | 01 00 00 00 00 00 00 00 00 80 04 08 00 80 04 08 | 17 | 94 00 00 00 94 00 00 00 04 00 00 00 00 10 00 00 | 18 +--+----------------------------------------------+ 19 +-- File data start offset: 0x0 20 +-- File data bytes to load: 148 (0x94) 21 +-- Memory segment start addr: 0x08048000 22 +-- Memory segment byte size: 148 (0x94) 23 +-- Memory segment flags: R (0x4) 24 from 8048000 to 8048094... 25 0x08048000 7f 45 4c 46 01 01 01 00 00 00 00 00 .ELF........ 26 0x0804800c 00 00 00 00 02 00 03 00 01 00 00 00 ............ 27 0x08048018 00 90 04 08 34 00 00 00 d0 20 00 00 ....4....... 28 0x08048024 00 00 00 00 34 00 20 00 03 00 28 00 ....4.....(. 29 ...100 more bytes to load... 30 31 +-[Program Header 1]------------------------------+ 32 | 01 00 00 00 00 10 00 00 00 90 04 08 00 90 04 08 | 33 | 22 00 00 00 22 00 00 00 05 00 00 00 00 10 00 00 | 34 +--+----------------------------------------------+ 35 +-- File data start offset: 0x1000 36 +-- File data bytes to load: 34 (0x22) 37 +-- Memory segment start addr: 0x08049000 38 +-- Memory segment byte size: 34 (0x22) 39 +-- Memory segment flags: R+X (0x5) 40 +-- Contains entry point 0x08049000 41 from 8049000 to 8049022... 42 0x08049000 ba 0d 00 00 00 b9 00 a0 04 08 bb 01 ............ 43 0x0804900c 00 00 00 b8 04 00 00 00 cd 80 bb 00 ............ 44 0x08049018 00 00 00 b8 01 00 00 00 cd 80 .......... 45 46 +-[Program Header 2]------------------------------+ 47 | 01 00 00 00 00 20 00 00 00 A0 04 08 00 A0 04 08 | 48 | 0D 00 00 00 0D 00 00 00 06 00 00 00 00 10 00 00 | 49 +--+----------------------------------------------+ 50 +-- File data start offset: 0x2000 51 +-- File data bytes to load: 13 (0xd) 52 +-- Memory segment start addr: 0x0804a000 53 +-- Memory segment byte size: 13 (0xd) 54 +-- Memory segment flags: R+W (0x6) 55 from 804a000 to 804a00d... 56 0x0804a000 48 65 6c 6c 6f 20 57 6f 72 6c 64 21 Hello.World! 57 0x0804a00c 0a