https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106571
--- Comment #2 from Boris <bp at alien8 dot de> --- How can you check a mismatch if only the definition has the section attribute? Here's the kernel commit which fixes this for clang: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=db886979683a8360ced9b24ab1125ad0c4d2cf76 there's the same example in the commit message.