diff options
author | Mark Wielaard <[email protected]> | 2025-06-03 14:06:36 +0200 |
---|---|---|
committer | Mark Wielaard <[email protected]> | 2025-06-03 14:06:41 +0200 |
commit | 838c7cc03e4193df6d3089655d5a2ddd3efabd0b (patch) | |
tree | 529b571acd602f590898fcbb893a4cff3aef2ed8 | |
parent | 07bd923cea4b883ca2357e9fc80babcedd242b37 (diff) |
unstrip: update unstripped_shnum when adding a new section
If some section doesn't match between the stripped and unstripped file
we invent a new one. Make sure to also update the shnum value.
* src/unstrip.c (copy_elided_sections): Update unstripped_shnum.
Signed-off-by: Mark Wielaard <[email protected]>
-rw-r--r-- | src/unstrip.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/unstrip.c b/src/unstrip.c index 81c5496f..6c2a98ef 100644 --- a/src/unstrip.c +++ b/src/unstrip.c @@ -1666,6 +1666,7 @@ more sections in stripped file than debug file -- arguments reversed?")); ELF_CHECK (newdata != NULL && gelf_update_shdr (sec->outscn, &sec->shdr), _("cannot add new section: %s")); + unstripped_shnum++; if (strtab == NULL) strtab = dwelf_strtab_init (true); |