5 Boxed value caching, for memory saving can be done with linked lists
6 essentially although `valueOf` lookup would be very slow. It might be best to
11 I need a faster huffman lookup code, since that is quite slowing down my
12 build much (since I need to decompress the ZIP files). If I make the huffman
13 lookup fast then it should compile much faster. I devised my own seemingly
14 good speed huffman lookup using remaining bits and such, on my markerboard.
15 With a random huffman tree that I setup, each resulting value ends up being
20 So I need to figure out what is wrong with my ELF and why it says
25 Unless, a program header of zero is considered invalid, but other binaries use
26 the zero program header. Unless I absolutely need a data section.
30 However, removing the data section of a binary makes it still work (although in
31 the practice binary no text is printed).
35 Looks like QEMU fails in `load_elf_interp`. However my binary does not have
36 an interpreter because it is static. Also looks like the ELF is completely
37 corrupted too. But that structure is not initialized. So either
38 `elf_check_ident` fails or `elf_check_ehdr` does.
42 So now I built a debug version of QEMU.
46 Looks like it fails because the host page alignment is not correct, right now
47 the alignment is just zero so perhaps if it were made to be 4K.
51 I am actually going to need a better ELF writing class, with perhaps a builder
52 since there can be a large number of differences between different systems
53 which use ELF. I suppose the best thing to do would be to make it object
54 oriented so I can declare what I need.
58 Looks like the end address `Entry point address: 0x444cd0` is
59 not valid. And I hope it will work now.
63 Now it says invalid argument.
67 Appears that QEMU (and I suppose) Linux are trying to directly memory map the
68 ELF binary. Since the offset in the file is not meeting the target page mask,
69 it fails to load properly. However in the hello binaries there are:
71 [ 3] .text PROGBITS 00400018 001018 000020 00 AX 0 0 4
72 [ 2] .text PROGBITS 004000b0 0000b0 000020 00 AX 0 0 16
74 In the second case `0xb0` can be divided by 16. Also appears the target page
75 bits in QEMU MIPS is 12-bits.
79 Actualy sections are pointless. The hello worlds have:
81 LOAD 0x001000 0x00400000 0x00400000 0x00038 0x00038 R E 0x1000
82 LOAD 0x000000 0x00400000 0x00400000 0x000d0 0x000d0 R E 0x10000
86 LOAD 0x0000d8 0x00400000 0x00000000 0x44cd4 0x44cd4 R E 0x1000
88 So this means that the offset in the file has to match the alignment. So in
89 short I need a new and better ELF writer. The ELF writer has to be rewritten
90 anyway to be much better, because currently this is not going to work.
91 SquirrelJME is also a bit large at around 275KiB without any code. I can see
92 it becoming about 1MiB with everything. This is just an initial target however.
93 Eventually a new output could be generated which likely uses less size. But
94 also consider that the extra space is consumed by resources. So if entries
95 were to be deflated the binaries would be much smaller too. In the end, I
96 would deflate entries anyway.
100 First, `ExecutableOutput` needs to lose the linking, where it completely
101 becomes implementation dependent on what is done.