https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95928
--- Comment #13 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Andi Kleen from comment #12) > Okay. I only compared gcc-7 (working) vs gcc-9 (broken), but always with LTO. > > Looking at the kernel link it also uses --whole-archive. Perhaps that makes > a difference? > > I'll redo the test case with --whole-archive (will need some fixes) --whole-archive makes the difference.