From 9e67941dde6e7f2b0e46ca8e2c87d3fb12e5ead5 Mon Sep 17 00:00:00 2001 From: Thomas Weißschuh Date: Wed, 16 Apr 2025 14:06:19 +0200 Subject: tools/nolibc: move getauxval() to sys/auxv.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is the location regular userspace expects the definition. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20250416-nolibc-split-sys-v1-4-a069a3f1d145@linutronix.de Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/stdlib.h | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'tools/include/nolibc/stdlib.h') diff --git a/tools/include/nolibc/stdlib.h b/tools/include/nolibc/stdlib.h index 32b3038002c1..69cf1d4418f1 100644 --- a/tools/include/nolibc/stdlib.h +++ b/tools/include/nolibc/stdlib.h @@ -102,32 +102,6 @@ char *getenv(const char *name) return NULL; } -static __attribute__((unused)) -unsigned long getauxval(unsigned long type) -{ - const unsigned long *auxv = _auxv; - unsigned long ret; - - if (!auxv) - return 0; - - while (1) { - if (!auxv[0] && !auxv[1]) { - ret = 0; - break; - } - - if (auxv[0] == type) { - ret = auxv[1]; - break; - } - - auxv += 2; - } - - return ret; -} - static __attribute__((unused)) void *malloc(size_t len) { -- cgit v1.2.3