OSDN Git Service

tools/nolibc: move exported functions to their own section
authorWilly Tarreau <w@1wt.eu>
Mon, 7 Feb 2022 16:23:44 +0000 (17:23 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 21 Apr 2022 00:05:45 +0000 (17:05 -0700)
commit07f47ea06fe9d38c5e8d9068fba2468ed8bb8b59
tree1d0f2aae37ca62815b334841bf63b0b60b79182f
parentd9390de638cd9788090c6299273a41a8cfa0b499
tools/nolibc: move exported functions to their own section

Some functions like raise() and memcpy() are permanently exported because
they're needed by libgcc on certain platforms. However most of the time
they are not needed and needlessly take space.

Let's move them to their own sub-section, called .text.nolibc_<function>.
This allows ld to get rid of them if unused when passed --gc-sections.

Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/include/nolibc/stdlib.h
tools/include/nolibc/string.h