* Re: [PATCH] unstrip: Allow prelinked, but non-split .bss section.
@ 2014-06-03 11:53 Mark Wielaard
0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2014-06-03 11:53 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 246 bytes --]
On Mon, 2014-05-26 at 22:42 +0200, Mark Wielaard wrote:
> 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.
Pushed to master.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] unstrip: Allow prelinked, but non-split .bss section.
@ 2014-05-26 20:42 Mark Wielaard
0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2014-05-26 20:42 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 1617 bytes --]
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>
---
src/ChangeLog | 5 +++++
src/unstrip.c | 5 +++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index 4067583..4062fc7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
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.
diff --git a/src/unstrip.c b/src/unstrip.c
index 4738abb..3813694 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;
--
1.7.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-03 11:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-03 11:53 [PATCH] unstrip: Allow prelinked, but non-split .bss section Mark Wielaard
-- strict thread matches above, loose matches on Subject: below --
2014-05-26 20:42 Mark Wielaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).