unstrip: Add --force to force combining files when ELF headers don't match.

Older versions of GNU binutils strip would drop some ELF header flags.
Causing the main ELF file and the separate .debug file to have mismatched
ELF header fields. Unfortunately some distros are still shipping such files.
eu-unstrip doesn't want to recombine such files. Add a more explicit
explanation which fields don't match and provide a --force, -F flag to
force combining such files anyway (producing a warning).

https://bugzilla.redhat.com/show_bug.cgi?id=698005
https://bugzilla.redhat.com/show_bug.cgi?id=806474

Signed-off-by: Mark Wielaard <mjw@redhat.com>
unstrip: Allow prelinked, but non-split .bss section.

If the section sh_size of the original and undo section are equal then
match them and don't set split_bss. This is also what prelink's
undo_sections allows.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
readelf: Don't print 'for section' when rela section sh_info is zero.

This matches how handle_relocs_rel already printed the header.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
readelf: Skip section if name is NULL in print_debug.

Don't crash and burn when a section doesn't have a name (possibly invalid
ELF file string table). Just try the next section instead of calling strcmp
on NULL.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
Merge branch 'master' into portable