explain/tinyelf-arm.md
... ...
@@ -50,10 +50,10 @@ ehdr:
50 50
.ascii "K2^TiTAN" @.byte 0,0,0,0,0,0,0 @ EI_PAD
51 51
e_type: .2byte 2 @ ET_EXEC
52 52
e_machine: .2byte 40 @ EM_ARM
53
- e_version: .4byte 1337
53
+ e_version: .ascii "gree"
54 54
e_entry: .4byte _start
55 55
e_phoff: .4byte phdr - ehdr
56
- e_shoff: .4byte 31337
56
+ e_shoff: .ascii "tsto"
57 57
e_flags:
58 58
@.4byte 0x2|0x4|0x40|0x80|0x00400000|0x05000000
59 59
@ 2: hasentry
... ...
@@ -62,23 +62,23 @@ ehdr:
62 62
@ 80: EABI
63 63
@ 00400000: little-endian AAPCS
64 64
@ 05000000: EABI v5
65
- .4byte 0xdeadbeef @ 0x05000000 @ EABIv5, no float stuff
65
+ .ascii "brea" @ 0x05000000 @ EABIv5, no float stuff
66 66
e_ehsize: .2byte e__end - ehdr
67 67
e_phentsize: .2byte p__end - phdr
68 68
e_phnum: .2byte 1
69
- e_shentsize: .2byte 1337
70
- e_shnum: .2byte 1337
71
- e_shstrndx: .2byte 1337
69
+ e_shentsize: .ascii "dbox&&"
70
+ @e_shnum:
71
+ @e_shstrndx:
72 72
e__end:
73 73
phdr:
74 74
p_type: .4byte 1 @ PT_LOAD
75 75
p_offset: .4byte 0
76 76
p_vaddr: .4byte ORG
77
- p_paddr: .4byte 1337
77
+ p_paddr: .ascii "all@"
78 78
p_filesz: .4byte _start__end - _start + e__end - ehdr + p__end - phdr
79 79
p_memsz: .4byte _start__end - _start + e__end - ehdr + p__end - phdr
80
- p_flags: .4byte 5 | (1337 << 8) @ R=4 W=2 X=1
81
- p_align: .4byte 0xDEADBEEF @ 0x1000
80
+ p_flags: .byte 5 ; ascii "IRC" @ R=4 W=2 X=1
81
+ p_align: .ascii "#lsc" @ 0x1000
82 82
p__end:
83 83
84 84
.global _start
... ...
@@ -103,4 +103,14 @@ SECTIONS {
103 103
*(.ehdr*)
104 104
}
105 105
}
106
+```
107
+
108
+```
109
+00000000 7f 45 4c 46 70 63 79 2f 4b 32 5e 54 69 54 41 4e |.ELFpcy/K2^TiTAN|
110
+00000010 02 00 28 00 67 72 65 65 54 80 04 08 34 00 00 00 |..(.greeT...4...|
111
+00000020 74 73 74 6f 62 72 65 61 34 00 20 00 01 00 64 62 |tstobrea4. ...db|
112
+00000030 6f 78 26 26 01 00 00 00 00 00 00 00 00 80 04 08 |ox&&............|
113
+00000040 61 6c 6c 40 60 00 00 00 60 00 00 00 05 49 52 43 |all@`...`....IRC|
114
+00000050 23 6c 73 63 01 70 a0 e3 2a 00 a0 e3 69 7a 00 ef |#lsc.p..*...iz..|
115
+00000060
106 116
```
... ...
\ No newline at end of file