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, 24 Feb 2022 17:56:46 +0000 (09:56 -0800)
commit919dc8eb88fadc96118e4968cfdb61aad430bca1
tree95f813ee81863b096738beb74f85fb0c9bc451a7
parent087477fac4c966f387d475f05832ff162c6da23c
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