summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/debugedit.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/debugedit.c b/tools/debugedit.c
index 03788ff..d473b80 100644
--- a/tools/debugedit.c
+++ b/tools/debugedit.c
@@ -3638,7 +3638,15 @@ fdopen_dso (int fd, const char *name)
3638 /* If there are phdrs we want to maintain the layout of the 3638 /* If there are phdrs we want to maintain the layout of the
3639 allocated sections in the file. */ 3639 allocated sections in the file. */
3640 if (phnum != 0) 3640 if (phnum != 0)
3641 elf_flagelf (elf, ELF_C_SET, ELF_F_LAYOUT); 3641 {
3642 elf_flagelf (elf, ELF_C_SET, ELF_F_LAYOUT);
3643 /* Normally elf_update will do some strict checks on sections,
3644 specifically it will check that sh_size is a multiple of
3645 sh_entsize (if not zero). This might prevent debugedit from
3646 writing out some sections it just wants to keep unchanged
3647 (even if they aren't strictly valid ELF). */
3648 elf_flagelf (elf, ELF_C_SET, ELF_F_PERMISSIVE);
3649 }
3642 3650
3643 memset (dso, 0, sizeof(DSO)); 3651 memset (dso, 0, sizeof(DSO));
3644 dso->elf = elf; 3652 dso->elf = elf;