[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250416-nolibc-split-sys-v1-2-a069a3f1d145@linutronix.de>
Date: Wed, 16 Apr 2025 14:06:17 +0200
From: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
To: Willy Tarreau <w@....eu>,
Thomas Weißschuh <linux@...ssschuh.net>
Cc: linux-kernel@...r.kernel.org,
Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Subject: [PATCH 02/10] 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@...utronix.de>
---
tools/include/nolibc/Makefile | 1 +
tools/include/nolibc/elf.h | 15 +++++++++++++++
tools/include/nolibc/nolibc.h | 1 +
3 files changed, 17 insertions(+)
diff --git a/tools/include/nolibc/Makefile b/tools/include/nolibc/Makefile
index f562cb53be10efc4e0758b8836cf3ace5b3c151f..fd76d267d79a8533b7e78375c30324c962b01973 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 0000000000000000000000000000000000000000..beb0b3a87569a3037055c8fe7e9b086a26ca7d13
--- /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@...utronix.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 70872401aca8d5aa37b12ee585193353f692576d..127f0d9068c6508bd45acfe0ebf2ce15acc422b0 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"
--
2.49.0
Powered by blists - more mailing lists