]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
ARC e_flags vs. objcopy
authorAlan Modra <amodra@gmail.com>
Tue, 16 Apr 2024 22:36:05 +0000 (08:06 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 16 Apr 2024 23:55:15 +0000 (09:25 +0930)
commitf6a18d1f55da5820fa1462950704d209a4c41817
treee703f76f7d220f14551a72ed7090f8534a974e3d
parent59497587af9e1c5f029ab0bb106103dab30a5f5d
ARC e_flags vs. objcopy

While the patch that Nick reverted in commit 3f6a060c7543 was in the
source, "FAIL: objcopy executable (pr25662)" was seen on ARC.  The
failure was triggered by the .ARC.attributes section being removed by
the linker script.  When a file lacking this section is copied by
objcopy, e_flags from the input is copied to the output (in this case
the value 0x406), but arc_elf_final_write_processing then logical-ors
in 0x300 when Tag_ARC_ABI_osver is not found.

* elf32-arc.c (arc_elf_final_write_processing): Don't ignore
existing e_flags for objcopy.
bfd/elf32-arc.c