Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: LGPL-2.1 OR MIT */
0002 /*
0003  * Copyright (C) 2017-2022 Willy Tarreau <w@1wt.eu>
0004  */
0005 
0006 /* Below comes the architecture-specific code. For each architecture, we have
0007  * the syscall declarations and the _start code definition. This is the only
0008  * global part. On all architectures the kernel puts everything in the stack
0009  * before jumping to _start just above us, without any return address (_start
0010  * is not a function but an entry pint). So at the stack pointer we find argc.
0011  * Then argv[] begins, and ends at the first NULL. Then we have envp which
0012  * starts and ends with a NULL as well. So envp=argv+argc+1.
0013  */
0014 
0015 #ifndef _NOLIBC_ARCH_H
0016 #define _NOLIBC_ARCH_H
0017 
0018 #if defined(__x86_64__)
0019 #include "arch-x86_64.h"
0020 #elif defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__)
0021 #include "arch-i386.h"
0022 #elif defined(__ARM_EABI__)
0023 #include "arch-arm.h"
0024 #elif defined(__aarch64__)
0025 #include "arch-aarch64.h"
0026 #elif defined(__mips__) && defined(_ABIO32)
0027 #include "arch-mips.h"
0028 #elif defined(__riscv)
0029 #include "arch-riscv.h"
0030 #endif
0031 
0032 #endif /* _NOLIBC_ARCH_H */