]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
bfd: have objcopy retain unknown ELF section flags
authorJan Beulich <jbeulich@suse.com>
Fri, 15 Aug 2025 10:16:22 +0000 (12:16 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 15 Aug 2025 10:16:22 +0000 (12:16 +0200)
commitb3743a2c05d153deb5ad0ffdbee6ed5487d6e229
treeead06d0b2c9faa87287883c0aa3b6d7c3b04298d
parent9b383903e73cd01f2fbe9728d0c31fea765ba8d6
bfd: have objcopy retain unknown ELF section flags

Silently zapping them is certainly wrong. When they're not replaced due
to user request, simply keeping them may not always be correct (we don't
know what such a flag means, after all), but is certainly at least
closer to having the output object still represent what the input object
had.

This introduces new binutils/ testsuite failures, but only for two
targets where most of the tests there fail anyway (amdgcn-elf and
nfp-elf), due to there not being an assembler available.
bfd/elf.c
binutils/testsuite/binutils-all/copy-7.d [new file with mode: 0644]
binutils/testsuite/binutils-all/copy-7.s [new file with mode: 0644]
binutils/testsuite/binutils-all/objcopy.exp