https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92938
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to jcmvbkbc from comment #7) > It is not in .init*, but that's ok: the reference from .init to .text is > present in the original source. It's the reference from .text* to .init* > which is not present in the source but is generated by gcc that is the issue. >It's the reference from .text* to .init* > which is not present in the source but is generated by gcc that is the issue. HUH? You mean exp2_to_exp3_mask is in the .init section? Well GCC can never know that cannot be referenced directly from a .text* section. The Linux kernel still has many issues like this. Maybe add the noclone attribute for all functions in the linux kernel which are called from the .init section. BUT THIS still requires sources changes of the linux kernel. THIS CANNOT be fixed in GCC as GCC does not know and should never know about the special semantics of .init section. Though maybe there could be an attribute which is applied to all .init functions which causes noclone of functions called to happen. A version of noclone which applies to the callees rather than the function itself.