Only elf files with strange GNU_RELRO segments fail the load, save, cycle.
It would maybe a good idea to separate the layout functionality from the
current save. The current coupling of layout and save make it
impossible to build layouts which contain the elf header via the public
API.
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.