On Fri, Sep 17, 2021 at 10:08:34AM +0200, Florian Weimer via Gcc wrote: > > So the compiler would emit a call to __memcmpeq and at the same time > > emit a weak alias of __memcmpeq to memcmp so the program links > > when the libc version targeted does not provide __memcmpeq? Or would > > glibc through <string.h> magically communicate the availability of the new > > ABI > > without actually declaring the function? > > I do not think ELF provides that capability. > > We can add a declaration to <string.h> to communicate the availability. > I think this is how glibc (and other libcs) communicate the availability > of non-standard interfaces to GCC.
Yeah, that is what we've done in the past, e.g. in case of stpcpy. Jakub