2014-05-26 Mark Wielaard <mjw@redhat.com>
+ * unstrip.c (find_alloc_sections_prelink): Allow non-split .bss
+ section when sh_size of the original and undo .bss section are equal.
+
+2014-05-26 Mark Wielaard <mjw@redhat.com>
+
* unstrip.c (options): Add --force, -F.
(struct arg_info): Add bool force.
(parse_opt): Handle 'F', set force.
&& (sec->shdr.sh_type == undo_sec->shdr.sh_type
|| (sec->shdr.sh_type == SHT_PROGBITS
&& undo_sec->shdr.sh_type == SHT_NOBITS))
- && sec->shdr.sh_size < undo_sec->shdr.sh_size
+ && sec->shdr.sh_size <= undo_sec->shdr.sh_size
&& (!strcmp (sec->name, ".bss")
|| !strcmp (sec->name, ".sbss"))
- && (split_bss = sec) > sections)))
+ && (sec->shdr.sh_size == undo_sec->shdr.sh_size
+ || (split_bss = sec) > sections))))
{
sec->outscn = undo_sec->outscn;
undo_sec = NULL;