tools/nolibc/string: export memset() and memmove()
authorWilly Tarreau <w@1wt.eu>
Mon, 7 Feb 2022 16:23:47 +0000 (17:23 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 14 Feb 2022 18:48:54 +0000 (10:48 -0800)
commit3fcf2cd11bc68698f870a6974b67f3232e7112b8
tree7938d2d5e4e19006e41f4ae3d220b137c342f376
parent0a3e789c9b2972d857956fc5e06d0fd09e045bb2
tools/nolibc/string: export memset() and memmove()

"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: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/include/nolibc/string.h