mirror of
https://github.com/torvalds/linux.git
synced 2024-12-14 15:13:52 +00:00
271661c1cd
In order to ease maintenance, this splits the arch-specific code into one file per architecture. A common file "arch.h" is used to include the right file among arch-* based on the detected architecture. Projects which are already split per architecture could simply rename these files to $arch/arch.h and get rid of the common arch.h. For this reason, include guards were placed into each arch-specific file. Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
33 lines
1.1 KiB
C
33 lines
1.1 KiB
C
/* SPDX-License-Identifier: LGPL-2.1 OR MIT */
|
|
/*
|
|
* Copyright (C) 2017-2022 Willy Tarreau <w@1wt.eu>
|
|
*/
|
|
|
|
/* Below comes the architecture-specific code. For each architecture, we have
|
|
* the syscall declarations and the _start code definition. This is the only
|
|
* global part. On all architectures the kernel puts everything in the stack
|
|
* before jumping to _start just above us, without any return address (_start
|
|
* is not a function but an entry pint). So at the stack pointer we find argc.
|
|
* Then argv[] begins, and ends at the first NULL. Then we have envp which
|
|
* starts and ends with a NULL as well. So envp=argv+argc+1.
|
|
*/
|
|
|
|
#ifndef _NOLIBC_ARCH_H
|
|
#define _NOLIBC_ARCH_H
|
|
|
|
#if defined(__x86_64__)
|
|
#include "arch-x86_64.h"
|
|
#elif defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__)
|
|
#include "arch-i386.h"
|
|
#elif defined(__ARM_EABI__)
|
|
#include "arch-arm.h"
|
|
#elif defined(__aarch64__)
|
|
#include "arch-aarch64.h"
|
|
#elif defined(__mips__) && defined(_ABIO32)
|
|
#include "arch-mips.h"
|
|
#elif defined(__riscv)
|
|
#include "arch-riscv.h"
|
|
#endif
|
|
|
|
#endif /* _NOLIBC_ARCH_H */
|