Previously, such sections would be marked as SHT_PROGBITS which makes it impossible to use an initialized C variable declaration to emit an (allocated) ELF note. The new behavior is also consistent with the ELF assembly parser.
There is a related GCC bug 77609.
Shouldn't this be Name == ".note" || Name.startswith(".note.")?