cbfstool: merge consecutive elf sections in program segments

Instead of creating a loadable segment for each section with
SHF_ALLOC flag merge those sections into a single program
segment. This makes  more tidy readelf, but it also allows
one to extract an rmodule into an ELF and turn it back into
an rmodule.

TEST=Extracted both regular stages and rmodule stages. Compared
     against original ELF files prior to cbfs insert.

Change-Id: I0a600d2e9db5ee6c11278d8ad673caab1af6c759
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/12220
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
1 file changed