MaskRay wrote: -mlong-calls is an old-fashioned compiler option. I think it was added before linkers knew range extension thunks (aka stubs, veneers, etc).
Can you use -fno-plt instead? It works with both SelectionDAG and GlobalISel. You will get GOT-generating code sequence that can be optimized to adrp+add by the linker. You can use --emit-relocs to get relocations in the executable. We could implement `__attribute__((noplt))`, if you want the patching to be per-function. The proposed -mlong-calls is -fno-pic hack that works with limited scenarios with a large performance downside. I don't think we should support it. https://github.com/llvm/llvm-project/pull/142982 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits