When rewriting an ELF header (i.e. in strip and objcopy), keep the
authormiod <miod@openbsd.org>
Wed, 10 Apr 2024 19:43:16 +0000 (19:43 +0000)
committermiod <miod@openbsd.org>
Wed, 10 Apr 2024 19:43:16 +0000 (19:43 +0000)
commitd11f3b71804f4757a4ff791b5e5269bf01606936
treece082dc77b461e41902e18e6b776f606a386e676
parent6501488b448aa7c09c43e1353e01ff1cd5ea3327
When rewriting an ELF header (i.e. in strip and objcopy), keep the
.openbsd.syscalls section with the PT_OPENBSD_SYSCALLS phdr, even though is
does not have the ALLOC flag; otherwise the phdr gets rewritten with a size
of zero, which prevents the binary from working.

ok kettenis@
gnu/usr.bin/binutils-2.17/bfd/elf.c