summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorDavid Laight <david.laight.linux@gmail.com>2026-03-08 11:37:28 +0000
committerThomas Weißschuh <linux@weissschuh.net>2026-03-20 17:46:07 +0100
commit2177dd375d087012907e389f787b21ac38bb1785 (patch)
tree365fa498a048ab5398a4fd6c9ee2b9ed08e22b97 /tools/perf/scripts/python
parentab7cd329a837711b88600e5d776836f16a0e8de8 (diff)
tools/nolibc: Implement strerror() in terms of strerror_r()
strerror() can be the only part of a program that has a .data section. This requires 4k in the program file. Add a simple implementation of strerror_r() and use that in strerror() so that the "errno=" string is copied at run-time. Use __builtin_memcpy() because that optimises away the input string and just writes the required constants to the target buffer. Code size change largely depends on whether the inlining decision for strerror() changes. Change the tests to use the normal EXPECT_VFPRINTF() when testing %m. Skip the tests when !is_nolibc. Signed-off-by: David Laight <david.laight.linux@gmail.com> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260308113742.12649-4-david.laight.linux@gmail.com Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions