From: Aaron Merey Date: Tue, 23 Jul 2024 19:26:26 +0000 (-0400) Subject: strip.c: Apply --permissive when writing the debug file X-Git-Tag: elfutils-0.192~63 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=27a64ef36a09a489c0e70e8c6bc1a2783ea1d714;p=thirdparty%2Felfutils.git strip.c: Apply --permissive when writing the debug file The --permissive command line option is applied when writing the binary being stripped but is not applied when writing its separate debug file. Change this so that --permissive applies to writing the debug file as well. Signed-off-by: Aaron Merey --- diff --git a/src/strip.c b/src/strip.c index 6436443d..403e0f6f 100644 --- a/src/strip.c +++ b/src/strip.c @@ -2464,6 +2464,8 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, if (debug_fname != NULL && removing_sections) { /* Finally write the file. */ + if (permissive) + elf_flagelf (debugelf, ELF_C_SET, ELF_F_PERMISSIVE); if (unlikely (elf_update (debugelf, ELF_C_WRITE) == -1)) { error (0, 0, _("while writing '%s': %s"),