https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116483
--- Comment #4 from Xi Ruoyao <xry111 at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #3) > > But for satisfying some tools analyzing the generated machine code > > Also this sounds like a limitation in the tool analyzing the generated code > and outside of gcc; I know helping the tool along is useful but that sounds > like a workaround instead of fixing the tool. The tool is objtool from the Linux kernel. It needs to know all the locations that a branch instruction may jump into. In the past objtool only works on x86, where objtool can find the relocation against the nearest instruction before the jump instruction, which points to the goto table. But on RISC machines (for example LoongArch) this approach does not work: with -fsection-anchors (often enabled at -O1 or above) the relocation entry may actually points to the section anchor instead of the table. And w/o the help of the compiler we'd have to figure out the address of the goto table by interpreting the LoongArch machine code, and doing so is not easy.