Created attachment 14178 [details] aarch64: properly initialize def_protected member Hi. "aarch64: Disallow copy relocations on protected data" [1] commit unfortunately does not initialize def_protected member. This leads to spurious "copy relocation against non-copyable protected symbol" errors as def_protected member might not be touched (if definition is false) and the allocation routine (bfd_hash_allocate/objalloc_alloc) does not appear to zero initialize allocated space. Attached a patch proposal. [1] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=90b7a5df152a64d2bea20beb438e8b81049a5c30
The master branch has been updated by Alan Modra <amodra@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7c24bdc583511d7c98a37d77f5536a005075ff05 commit 7c24bdc583511d7c98a37d77f5536a005075ff05 Author: Pekka Seppänen <pexu@sourceware.mail.kapsi.fi> Date: Tue Jun 28 11:11:35 2022 +0930 PR29293, elfnn-aarch64.c: def_protected member unintialized PR 29293 * elfnn-aarch64.c (elfNN_aarch64_link_hash_newfunc): Init def_protected.
Thanks, I'd noticed the fails too but hadn't investigated.