3 ms·
Does glibc not have feature detection and conditional compilation for cases like this? That is surprising to me.
by asdfasgasdgasdg 5y ago
Does glibc not have feature detection and conditional compilation for cases like this? That is surprising to me.
- rwmj 5y agoIt does. Each subdirectory of sysdeps/ can contain specific implementations per platform, arch, etc. eg: the aarch64 assembler memset is: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/aarch64/memset.S https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/aar... There's also the "ifunc" mechanism which can be used to make the choice at runtime, eg: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/aarch64/multiarch/memset.c https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/aar...