diff options
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/unstrip.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4067583a..4062fc7f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2014-05-26 Mark Wielaard <[email protected]> + * 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 <[email protected]> + * unstrip.c (options): Add --force, -F. (struct arg_info): Add bool force. (parse_opt): Handle 'F', set force. diff --git a/src/unstrip.c b/src/unstrip.c index 65bb2516..f6af4500 100644 --- a/src/unstrip.c +++ b/src/unstrip.c @@ -1125,10 +1125,11 @@ find_alloc_sections_prelink (Elf *debug, Elf_Data *debug_shstrtab, && (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; |
