• Willy Tarreau's avatar
    tools/nolibc/string: export memset() and memmove() · 8d304a37
    Willy Tarreau authored
    "clang -Os" and "gcc -Ofast" without -ffreestanding may ignore memset()
    and memmove(), hoping to provide their builtin equivalents, and finally
    not find them. Thus we must export these functions for these rare cases.
    Note that as they're set in their own sections, they will be eliminated
    by the linker if not used. In addition, they do not prevent gcc from
    identifying them and replacing them with the shorter "rep movsb" or
    "rep stosb" when relevant.
    Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
    Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
    8d304a37
string.h 3.48 KB