Hi! extern void bar (void) __attribute__((visibility ("hidden"))); void foo (void) { bar (); bar (); } compiled on ppc64-linux with -O2 -m64 -mminimal-toc leads to bl bar without nop in the following instruction and to sibling call. Now, when this together with bar's definition is linked into a big binary and foo and bar need to have different TOCs, ld issues error: sibling call optimization to `bar' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `foo' extern
Shouldn't -mminimal-toc also forbid omitting nops if the target call isn't defined in the same file and forbid sibcalls to such functions? Or do we need another switch? In this case -mminimal-toc, nor -fno-optimize-sibling-calls helps ATM, only removing the hidden visibility. Jakub