On Mon, May 20, 2019 at 03:39:50AM -0500, Segher Boessenkool wrote: > But it means it needs to make a stub for every global entry point that > is used?
Mostly. Calls via function pointer don't (*), nor do you need stubs when generating inline PLT calls. I'll note that use of the global entry point for direct calls is closely associated with needing a PLT entry, and the stubs we're talking about here are similar to the code other architectures put in their .plt section. *) The exception is when a non-PIC executable initialises a function pointer in read-only memory to a function defined outside the executable. This case requires a special stub in the executable to serve as the address of the function. -- Alan Modra Australia Development Lab, IBM