]> git.baikalelectronics.ru Git - kernel.git/commit
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>
Thu, 21 Apr 2022 00:05:45 +0000 (17:05 -0700)
commit59d1a1ee9f06d11e37faf56c3f24c3a209613f20
tree46d1605d1ee407987d1ff525c2afefb4050fe4b1
parentb6d4bdc9ee0950819886e962f92ef6c712172c1d
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