Implemented runtime files and tests
This commit is contained in:
@@ -14,9 +14,9 @@
|
||||
#define __have_long32 1
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif /* defined(__cplusplus) */
|
||||
|
||||
#ifdef __INT8_TYPE__
|
||||
typedef __INT8_TYPE__ __int8_t;
|
||||
@@ -236,8 +236,8 @@ typedef __uint64_t __uint_fast64_t;
|
||||
|
||||
#undef __EXP
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
#endif /* defined(__cplusplus) */
|
||||
|
||||
#endif /* _MACHINE__STDINT_H */
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif /* defined(__cplusplus) */
|
||||
|
||||
typedef __intptr_t ptrdiff_t;
|
||||
typedef __uintptr_t size_t;
|
||||
@@ -16,6 +16,6 @@ typedef int wchar_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
#endif /* defined(__cplusplus) */
|
||||
|
||||
#endif
|
||||
#endif /* STDDEF_H_ */
|
||||
|
||||
@@ -50,4 +50,4 @@ typedef __uintptr_t uintptr_t;
|
||||
|
||||
typedef
|
||||
|
||||
#endif
|
||||
#endif /* STDINT_H_ */
|
||||
|
||||
15
photon/libc/sys/linux/machine/x86_64/crt0.s
Normal file
15
photon/libc/sys/linux/machine/x86_64/crt0.s
Normal file
@@ -0,0 +1,15 @@
|
||||
.global _start
|
||||
.type _start, @function
|
||||
|
||||
.extern main
|
||||
.type main, @function
|
||||
|
||||
_start:
|
||||
pop %rbp
|
||||
pop %rdi
|
||||
mov %rsp, %rsi
|
||||
andq $-16, %rsp
|
||||
call main
|
||||
movq %rax, %rdi
|
||||
movq $60, %rax
|
||||
syscall
|
||||
Reference in New Issue
Block a user