https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82501
--- Comment #16 from Martin Liška <marxin at gcc dot gnu.org> --- Created attachment 45797 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45797&action=edit Patch candidate Patch candidate where I made some refactoring and come up with tests. Works fine on x86_64, on ppc64le there are some issues with -fsection-anchors, but that would be possible to resolve. Please let me know if you're fine with that and we can submit that to gcc-patches ML?