Re:“Shared libraries are not a good thing in general”
by bonzini on Sunday May 02, 2021 @02:25AM
(#27012781)
> But also for each function call you have to make an indirect jump into it.
Only the first call has a penalty. Then you call into the PLT and the PLT contains a direct jump to the function.
Re:“Shared libraries are not a good thing in general”
by kaba0 on Sunday May 02, 2021 @04:48AM
(#27013455)
It still has a cost over potential inlining (that allows for more optimizations as well).
Of course if it is not a hotspot, it is meaningless.
Re:“Shared libraries are not a good thing in general”
by creamytaco on Sunday May 02, 2021 @10:31AM
(#27015630)
The call into the PLT is a penalty.
And you have to consider some performance penalty when using shared libraries. First you have a time penalty when loading the executable, since first you have to run the interpreter (ld-linux) and then your actual code. But also for each function call you have to make an indirect jump into it.