Commit 418becac authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'nolibc-20250308-for-6.15-1' of...

Merge tag 'nolibc-20250308-for-6.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu

Pull nolibc updates from Paul McKenney:
 - 32bit s390 support
 - opendir() and friends
 - openat() support
 - sscanf() support
 - various cleanups

[ Paul has just forwarded the pull request from Thomas Weißschuh, so
  the tag signature is from Thomas, not Paul   - Linus ]

* tag 'nolibc-20250308-for-6.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: (26 commits)
  tools/nolibc: don't use asm/ UAPI headers
  selftests/nolibc: stop testing constructor order
  selftests/nolibc: use O_RDONLY flag instead of 0
  tools/nolibc: drop outdated example from overview comment
  tools/nolibc: process open() vararg as mode_t
  tools/nolibc: always use openat(2) instead of open(2)
  tools/nolibc: add support for openat(2)
  selftests/nolibc: add armthumb configuration
  selftests/nolibc: explicitly enable ARM mode
  Revert "selftests: kselftest: Fix build failure with NOLIBC"
  tools/nolibc: add support for [v]sscanf()
  tools/nolibc: add support for 32-bit s390
  selftests/nolibc: rename s390 to s390x
  selftests/nolibc: only run constructor tests on nolibc
  selftests/nolibc: split up architecture list in run-tests.sh
  tools/nolibc: add support for directory access
  tools/nolibc: add support for sys_llseek()
  selftests/nolibc: always keep test kernel configuration up to date
  selftests/nolibc: execute defconfig before other targets
  selftests/nolibc: drop call to mrproper target
  ...
parents bcb04425 bceb7390
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ all_files := \
		compiler.h \
		crt.h \
		ctype.h \
		dirent.h \
		errno.h \
		nolibc.h \
		signal.h \
+1 −0
Original line number Diff line number Diff line
@@ -179,6 +179,7 @@
})

/* startup code, note that it's called __start on MIPS */
void __start(void);
void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector __start(void)
{
	__asm__ volatile (
+7 −2
Original line number Diff line number Diff line
@@ -5,8 +5,8 @@

#ifndef _NOLIBC_ARCH_S390_H
#define _NOLIBC_ARCH_S390_H
#include <asm/signal.h>
#include <asm/unistd.h>
#include <linux/signal.h>
#include <linux/unistd.h>

#include "compiler.h"
#include "crt.h"
@@ -143,8 +143,13 @@
void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _start(void)
{
	__asm__ volatile (
#ifdef __s390x__
		"lgr	%r2, %r15\n"          /* save stack pointer to %r2, as arg1 of _start_c */
		"aghi	%r15, -160\n"         /* allocate new stackframe                        */
#else
		"lr	%r2, %r15\n"
		"ahi	%r15, -96\n"
#endif
		"xc	0(8,%r15), 0(%r15)\n" /* clear backchain                                */
		"brasl	%r14, _start_c\n"     /* transfer to c runtime                          */
	);
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@
#include "arch-powerpc.h"
#elif defined(__riscv)
#include "arch-riscv.h"
#elif defined(__s390x__)
#elif defined(__s390x__) || defined(__s390__)
#include "arch-s390.h"
#elif defined(__loongarch__)
#include "arch-loongarch.h"
+2 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
char **environ __attribute__((weak));
const unsigned long *_auxv __attribute__((weak));

void _start(void);
static void __stack_chk_init(void);
static void exit(int);

@@ -22,6 +23,7 @@ extern void (*const __init_array_end[])(int, char **, char**) __attribute__((wea
extern void (*const __fini_array_start[])(void) __attribute__((weak));
extern void (*const __fini_array_end[])(void) __attribute__((weak));

void _start_c(long *sp);
__attribute__((weak,used))
void _start_c(long *sp)
{
Loading