summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>2025-04-16 14:06:17 +0200
committerThomas Weißschuh <linux@weissschuh.net>2025-04-19 14:22:20 +0200
commit2b45ceb915b004799e79f4ff68e63b7f88a7d195 (patch)
treeab0f758b2c263e3f3cbd9370beb4c35a4bd34fa5
parent060525302ba9ee56dfbcb4149395a1e510a4ced9 (diff)
tools/nolibc: add elf.h
The UAPI header do already provide an elf.h implementation. Reexport it under its libc name. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250416-nolibc-split-sys-v1-2-a069a3f1d145@linutronix.de Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
-rw-r--r--tools/include/nolibc/Makefile1
-rw-r--r--tools/include/nolibc/elf.h15
-rw-r--r--tools/include/nolibc/nolibc.h1
3 files changed, 17 insertions, 0 deletions
diff --git a/tools/include/nolibc/Makefile b/tools/include/nolibc/Makefile
index f562cb53be10..fd76d267d79a 100644
--- a/tools/include/nolibc/Makefile
+++ b/tools/include/nolibc/Makefile
@@ -30,6 +30,7 @@ all_files := \
crt.h \
ctype.h \
dirent.h \
+ elf.h \
errno.h \
limits.h \
nolibc.h \
diff --git a/tools/include/nolibc/elf.h b/tools/include/nolibc/elf.h
new file mode 100644
index 000000000000..beb0b3a87569
--- /dev/null
+++ b/tools/include/nolibc/elf.h
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: LGPL-2.1 OR MIT */
+/*
+ * Shim elf.h header for NOLIBC.
+ * Copyright (C) 2025 Thomas Weißschuh <thomas.weissschuh@linutronix.de>
+ */
+
+#ifndef _NOLIBC_SYS_ELF_H
+#define _NOLIBC_SYS_ELF_H
+
+#include <linux/elf.h>
+
+/* make sure to include all global symbols */
+#include "nolibc.h"
+
+#endif /* _NOLIBC_SYS_ELF_H */
diff --git a/tools/include/nolibc/nolibc.h b/tools/include/nolibc/nolibc.h
index 70872401aca8..127f0d9068c6 100644
--- a/tools/include/nolibc/nolibc.h
+++ b/tools/include/nolibc/nolibc.h
@@ -97,6 +97,7 @@
#include "types.h"
#include "sys.h"
#include "ctype.h"
+#include "elf.h"
#include "signal.h"
#include "unistd.h"
#include "stdio.h"