The initial implementation only made sure that all sections and segments
are properly aligned. This is enough for simple embedded applications
but can not deal with more complex layouts.
The new implementation should be more generic given that it respects the
virtual addresses of the individual sections.
One thing which is currently not supported by this rewrite are segments
which contain the program/segment header or even the whole elf header.