aboutsummaryrefslogtreecommitdiff
path: root/tools/include/nolibc/errno.h
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org> 2023-02-23 09:33:01 -0800
committerGravatar Linus Torvalds <torvalds@linux-foundation.org> 2023-02-23 09:33:01 -0800
commitf01d4c8a22908956f4018ed334bb6713e41b37c1 (patch)
treea0144706cc6b09de5ae26d1f148b549d7a0778a4 /tools/include/nolibc/errno.h
parentMerge tag 'nmi.2023.02.14a' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff)
parentselftests/nolibc: Add a "run-user" target to test the program in user land (diff)
downloadlinux-f01d4c8a22908956f4018ed334bb6713e41b37c1.tar.gz
linux-f01d4c8a22908956f4018ed334bb6713e41b37c1.tar.bz2
linux-f01d4c8a22908956f4018ed334bb6713e41b37c1.zip
Merge tag 'nolibc.2023.02.06a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu
Pull nolibc updates from Paul McKenney: - Add s390 support - Add support for the ARM Thumb1 instruction set - Fix O_* flags definitions for open() and fcntl() - Make errno a weak symbol instead of a static variable - Export environ as a weak symbol - Export _auxv as a weak symbol for auxilliary vector retrieval - Implement getauxval() and getpagesize() - Further improve self tests, including permitting userland testing of the nolibc library * tag 'nolibc.2023.02.06a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: (28 commits) selftests/nolibc: Add a "run-user" target to test the program in user land selftests/nolibc: Support "x86_64" for arch name selftests/nolibc: Add `getpagesize(2)` selftest nolibc/sys: Implement `getpagesize(2)` function nolibc/stdlib: Implement `getauxval(3)` function tools/nolibc: add auxiliary vector retrieval for s390 tools/nolibc: add auxiliary vector retrieval for mips tools/nolibc: add auxiliary vector retrieval for riscv tools/nolibc: add auxiliary vector retrieval for arm tools/nolibc: add auxiliary vector retrieval for arm64 tools/nolibc: add auxiliary vector retrieval for x86_64 tools/nolibc: add auxiliary vector retrieval for i386 tools/nolibc: export environ as a weak symbol on s390 tools/nolibc: export environ as a weak symbol on riscv tools/nolibc: export environ as a weak symbol on mips tools/nolibc: export environ as a weak symbol on arm tools/nolibc: export environ as a weak symbol on arm64 tools/nolibc: export environ as a weak symbol on i386 tools/nolibc: export environ as a weak symbol on x86_64 tools/nolibc: make errno a weak symbol instead of a static one ...
Diffstat (limited to 'tools/include/nolibc/errno.h')
-rw-r--r--tools/include/nolibc/errno.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/include/nolibc/errno.h b/tools/include/nolibc/errno.h
index 9dc4919c769b..a44486ff0477 100644
--- a/tools/include/nolibc/errno.h
+++ b/tools/include/nolibc/errno.h
@@ -9,11 +9,9 @@
#include <asm/errno.h>
-/* this way it will be removed if unused */
-static int errno;
-
#ifndef NOLIBC_IGNORE_ERRNO
#define SET_ERRNO(v) do { errno = (v); } while (0)
+int errno __attribute__((weak));
#else
#define SET_ERRNO(v) do { } while (0)
#endif