https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82303
--- Comment #12 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Thomas Garnier from comment #11) > I think for this file using only -mcmodel=large makes more sense. > > Given the proposed option (-fstatic-pie) is not kernel specific, the TLS is Sounds reasonable. > not needed. What do you think about disabling optimization like switch > folding [1]? It seems to exist only to remove relocations that is not even > needed in a classic -fPIE (or -fstatic-pie) scenario. > > [1] > https://github.com/gcc-mirror/gcc/blob/ > 7977b0509f07e42fbe0f06efcdead2b7e4a5135f/gcc/tree-switch-conversion.c#L828 Testcase please.