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>
Mon, 14 Feb 2022 18:48:54 +0000 (10:48 -0800)
commita099c31f4854876e5d7f2de039238b52d77566bf
tree40be29cfeed3b7938ed5f07dea1055bbf9688ee9
parent14c1d43d886afe7e5f0cc7311b3fa99da047d006
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