https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81342
--- Comment #3 from Anatol <anatol.pomozov at gmail dot com> --- Hi I indeed observe the issue in a kernel project. It is a custom x86 kernel that is not published yet. I tried to narrow down use case and I think I found how to reproduce the issue easily. It looks like a trigger pattern is: 1) compile one file as 32bit code (-m32) 2) convert it to 64bit elf object using objcopy 3) link the object above with regular 64bit elf If "-flto" is not used then linking works fine otherwise I have the crash above. Here is an attached repo case for your convenience.