[PATCH] D39079: New clang option -fno-plt to avoid PLT for external calls

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 24 10:26:15 PDT 2017


rnk added a comment.

In https://reviews.llvm.org/D39079#905372, @joerg wrote:

> Why again is this a good idea?


It saves the direct jump to the PLT, reducing icache pressure, which is a major cost in some workloads.

> This is an even worse hack than -Bsymbolic,

Personally, I would like to build LLVM with -Bsymbolic so that we can build LLVM as a DSO and load it from clang without regressing startup time, so I don't see what's so terrible about -Bsymbolic, especially for C++ programs.

> the latter at least is visible in ELF header without code inspection. This is breaking core premises of ELF.

What are you talking about?

Anyway, LLVM already has an attribute, nonlazybind, and this just provides a flag to apply it to all declarations. It gives the user access to the GOTPCREL relocations that we, and loaders, already support.


https://reviews.llvm.org/D39079





More information about the cfe-commits mailing list