Age | Commit message (Collapse) | Author |
|
|
|
Also removed a lot of dead code from the early days.
|
|
Turns out that x86-64 aligns LOAD segments to 0x200000 bytes.
Given that the mapping starts at 0x400000, there is not much room to
expand... so there will be a need to add additional LOAD headers.
|
|
|
|
|
|
|
|
Sections are now sorted by file offset and sh_link dependencies between
them as well as PHDR-SHDR dependencies are deduced as much as possible.
The downside is that while the output should still work just fine, 'make
check' fails to establish binary equivalence of input and output if the
section table is reordered. Thankfully, in normal GCC binaries it is
already ordered so we don't have to worry about this.
Unfortunately the ELF spec is very lax in this regard so we have to draw
a line ourselves.
|
|
|
|
|
|
This way we can just assume that stuff works later on and keep the code
clean and simple. It especially establishes that the file has a sane
format and is thus understandable and editable.
|
|
|
|
|
|
|
|
|
|
|
|
|