x86-64: new CET-enabled PLT format proposal
Fangrui Song
i@maskray.me
Tue Mar 1 22:16:24 GMT 2022
On 2022-03-01, Florian Weimer via Binutils wrote:
>I do wonder if time is better spent on making symbol binding faster in
>general, and eliminate the semantic difference between BIND_NOW and lazy
>binding (like musl has done, albeit in an IFUNC-less context).
>
>An example of the current performance issues:
>
> ld.so has poor performance characteristics when loading large
> quantities of .so files
> <https://sourceware.org/bugzilla/show_bug.cgi?id=27695>
>
>I'm not suggesting we bring back prelink. There must be other
>approaches to make binding go faster.
>
>Thanks,
>Florian
>
Improving symbol binding performance will definitely help and be
appreciated by companys deploying large dynamically linked executables.
They may run into a situation with O(1000) direct/indirect DT_NEEDED
shared objects. I remember that this can take more than one minute.
In
https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/google/grte/v5-2.27/master ,
Google uses a fastload patch
https://sourceware.org/git/?p=glibc.git;a=commit;h=af63681769182a8e29568088d6c9cd3c916b22f9
(I haven't tried reading it).
For more traditional desktop/server applications,
I think we should shift to direct binding model (Solaris direct binding,
Mac OS X two-level namespace)
https://maskray.me/blog/2021-05-16-elf-interposition-and-bsymbolic#the-last-alliance-of-elf-and-men
Definitions in shared objects don't need the costly symbol lookup.
More information about the Binutils
mailing list