News Score: Score the News, Sort the News, Rewrite the Headlines

Easy dynamic dispatch using GLIBC Hardware Capabilities

TL;DR With GLIBC 2.33+, you can build a shared library multiple times targeting various optimization levels, and the dynamic linker/loader will pick the highest version supported by the current CPU. For example, with the layout below, on a Ryzen 9 5900X, x86-64-v3/libfoo0.so would be loaded: /usr/lib/glibc-hwcaps/x86-64-v4/libfoo0.so /usr/lib/glibc-hwcaps/x86-64-v3/libfoo0.so /usr/lib/glibc-hwcaps/x86-64-v2/libfoo0.so /usr/lib/libfoo0.so Longer Version GLIBC Hardware Capabilities or "hwcaps" are...

Read more at kvr.at

© News Score  score the news, sort the news, rewrite the headlines