crt1: Move main declaration to mes/lib-mini.h.
* include/mes/lib-mini.h (main): New declaration. lib/freebsd/x86-mes-gcc/crt1.c (main): Remove declaration. lib/freebsd/x86-mes-mescc/crt1.c (main): Remove declaration. lib/gnu/x86-mes-gcc/crt1.c (main): Remove declaration. lib/linux/arm-mes-gcc/crt1.c (main): Remove declaration. lib/linux/arm-mes-m2/crt1.c (main): Remove declaration. lib/linux/arm-mes-mescc/crt1.c (main): Remove declaration. lib/linux/riscv64-mes-gcc/crt1.c (main): Remove declaration. lib/linux/riscv64-mes-m2/crt1.c (main): Remove declaration. lib/linux/riscv64-mes-mescc/crt1.c (main): Remove declaration. lib/linux/x86-mes-gcc/crt1.c (main): Remove declaration. lib/linux/x86-mes-m2/crt1.c (main): Remove declaration. lib/linux/x86-mes-mescc/crt1.c (main): Remove declaration. lib/linux/x86_64-mes-gcc/crt0.c (main): Remove declaration. lib/linux/x86_64-mes-gcc/crt1.c (main): Remove declaration. lib/linux/x86_64-mes-m2/crt1.c (main): Remove declaration. lib/linux/x86_64-mes-mescc/crt1.c (main): Remove declaration.
This commit is contained in:
parent
1fb7ade93c
commit
ad6c02076f
|
@ -52,6 +52,8 @@ extern int __stdout;
|
||||||
extern int __stderr;
|
extern int __stderr;
|
||||||
|
|
||||||
void __init_io ();
|
void __init_io ();
|
||||||
|
int main (int argc, char *argv[], char *envp[]);
|
||||||
|
|
||||||
int eputs (char const *s);
|
int eputs (char const *s);
|
||||||
int puts (char const *s);
|
int puts (char const *s);
|
||||||
int oputs (char const *s);
|
int oputs (char const *s);
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <mes/lib-mini.h>
|
#include <mes/lib-mini.h>
|
||||||
int main (int argc, char *argv[], char *envp[]);
|
|
||||||
|
|
||||||
// *INDENT-OFF*
|
// *INDENT-OFF*
|
||||||
void
|
void
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "mes/lib-mini.h"
|
#include "mes/lib-mini.h"
|
||||||
int main (int argc, char *argv[], char *envp[]);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
_start ()
|
_start ()
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
* along with Mes. If not, see <http://www.gnu.org/licenses/>.
|
* along with Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <mes/lib-mini.h>
|
||||||
#include <gnu/hurd.h>
|
#include <gnu/hurd.h>
|
||||||
int main (int argc, char *argv[], char *envp[]);
|
|
||||||
|
|
||||||
char **environ;
|
char **environ;
|
||||||
int __stdin;
|
int __stdin;
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <mes/lib-mini.h>
|
#include <mes/lib-mini.h>
|
||||||
int main (int argc, char *argv[], char *envp[]);
|
|
||||||
|
|
||||||
/* Note: GCC automatically emits a preable in order to set up the
|
/* Note: GCC automatically emits a preable in order to set up the
|
||||||
frame pointer: "push {fp}" "add fp, sp, 0"
|
frame pointer: "push {fp}" "add fp, sp, 0"
|
||||||
|
|
|
@ -24,7 +24,6 @@ int __stdin;
|
||||||
int __stdout;
|
int __stdout;
|
||||||
int __stderr;
|
int __stderr;
|
||||||
char **environ;
|
char **environ;
|
||||||
int main (int argc, char **argv, char **envp);
|
|
||||||
|
|
||||||
/* FIXME: this is going to be called `FUNCTION__start' */
|
/* FIXME: this is going to be called `FUNCTION__start' */
|
||||||
//#int
|
//#int
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "mes/lib-mini.h"
|
#include "mes/lib-mini.h"
|
||||||
int main (int argc, char *argv[], char *envp[]);
|
|
||||||
|
|
||||||
void /* must not return */
|
void /* must not return */
|
||||||
_start ()
|
_start ()
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <mes/lib-mini.h>
|
#include <mes/lib-mini.h>
|
||||||
int main (int argc, char *argv[], char *envp[]);
|
|
||||||
|
|
||||||
/* gcc will generate the following preamble:
|
/* gcc will generate the following preamble:
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@ int __stdin;
|
||||||
int __stdout;
|
int __stdout;
|
||||||
int __stderr;
|
int __stderr;
|
||||||
char **environ;
|
char **environ;
|
||||||
int main (int argc, char **argv, char **envp);
|
|
||||||
|
|
||||||
/* FIXME: this is going to be called `FUNCTION__start' */
|
/* FIXME: this is going to be called `FUNCTION__start' */
|
||||||
//#int
|
//#int
|
||||||
|
|
|
@ -21,9 +21,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "mes/lib-mini.h"
|
#include "mes/lib-mini.h"
|
||||||
#include "linux/riscv64/syscall.h"
|
|
||||||
|
|
||||||
int main (int argc, char *argv[], char *envp[]);
|
int main (int argc, char *argv[], char *envp[]);
|
||||||
|
#include "linux/riscv64/syscall.h"
|
||||||
|
|
||||||
/* mesc will generate the following preamble:
|
/* mesc will generate the following preamble:
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <mes/lib-mini.h>
|
#include <mes/lib-mini.h>
|
||||||
int main (int argc, char *argv[], char *envp[]);
|
|
||||||
|
|
||||||
// *INDENT-OFF*
|
// *INDENT-OFF*
|
||||||
void
|
void
|
||||||
|
|
|
@ -24,7 +24,6 @@ int __stdin;
|
||||||
int __stdout;
|
int __stdout;
|
||||||
int __stderr;
|
int __stderr;
|
||||||
char **environ;
|
char **environ;
|
||||||
int main (int argc, char **argv, char **envp);
|
|
||||||
|
|
||||||
/* FIXME: this is going to be called `FUNCTION__start' */
|
/* FIXME: this is going to be called `FUNCTION__start' */
|
||||||
//#int
|
//#int
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "mes/lib-mini.h"
|
#include "mes/lib-mini.h"
|
||||||
int main (int argc, char *argv[], char *envp[]);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
_start ()
|
_start ()
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
// let's try _main first
|
// let's try _main first
|
||||||
|
|
||||||
#include <mes/lib-mini.h>
|
#include <mes/lib-mini.h>
|
||||||
int main (int argc, char *argv[], char *envp[]);
|
|
||||||
|
|
||||||
// gcc x86_64 calling convention:
|
// gcc x86_64 calling convention:
|
||||||
// rdi, rsi, rdx, rcx, r8, r9, <stack0>, <stack1>
|
// rdi, rsi, rdx, rcx, r8, r9, <stack0>, <stack1>
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <mes/lib-mini.h>
|
#include <mes/lib-mini.h>
|
||||||
int main (int argc, char *argv[], char *envp[]);
|
|
||||||
|
|
||||||
// gcc x86_64 calling convention:
|
// gcc x86_64 calling convention:
|
||||||
// rdi, rsi, rdx, rcx, r8, r9, <stack0>, <stack1>
|
// rdi, rsi, rdx, rcx, r8, r9, <stack0>, <stack1>
|
||||||
|
|
|
@ -24,7 +24,6 @@ int __stdin;
|
||||||
int __stdout;
|
int __stdout;
|
||||||
int __stderr;
|
int __stderr;
|
||||||
char **environ;
|
char **environ;
|
||||||
int main (int argc, char **argv, char **envp);
|
|
||||||
|
|
||||||
/* FIXME: this is going to be called `FUNCTION__start' */
|
/* FIXME: this is going to be called `FUNCTION__start' */
|
||||||
//#int
|
//#int
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "mes/lib-mini.h"
|
#include "mes/lib-mini.h"
|
||||||
int main (int argc, char *argv[], char *envp[]);
|
|
||||||
|
|
||||||
int
|
int
|
||||||
_start ()
|
_start ()
|
||||||
|
|
Loading…
Reference in a new issue