diff options
Diffstat (limited to 'libc/arch/i386')
-rw-r--r-- | libc/arch/i386/crti.s | 14 | ||||
-rw-r--r-- | libc/arch/i386/crtn.s | 7 | ||||
-rw-r--r-- | libc/arch/i386/include/bits/types.h | 41 | ||||
-rw-r--r-- | libc/arch/i386/make.config | 6 |
4 files changed, 68 insertions, 0 deletions
diff --git a/libc/arch/i386/crti.s b/libc/arch/i386/crti.s new file mode 100644 index 0000000..906414b --- /dev/null +++ b/libc/arch/i386/crti.s @@ -0,0 +1,14 @@ +.section .init + +.global _init +.type _init, @function +_init: + pushl %ebp + movl %esp, %ebp + +.section .fini + +.global _fini +_fini: + pushl %ebp + movl %esp, %ebp diff --git a/libc/arch/i386/crtn.s b/libc/arch/i386/crtn.s new file mode 100644 index 0000000..447afb1 --- /dev/null +++ b/libc/arch/i386/crtn.s @@ -0,0 +1,7 @@ +.section .init + popl %ebp + ret + +.section .fini + popl %ebp + ret diff --git a/libc/arch/i386/include/bits/types.h b/libc/arch/i386/include/bits/types.h new file mode 100644 index 0000000..99946ff --- /dev/null +++ b/libc/arch/i386/include/bits/types.h @@ -0,0 +1,41 @@ +#ifndef BITS_TYPES_H + +typedef unsigned char __u_char; +typedef unsigned short __u_short; +typedef unsigned int __u_int; +typedef unsigned long __u_long; + +typedef signed char __int8_t; +typedef signed short int __int16_t; +typedef signed int __int32_t; +typedef signed long __int64_t; + +typedef unsigned char __uint8_t; +typedef unsigned short int __uint16_t; +typedef unsigned int __uint32_t; +typedef unsigned long __uint64_t; + +typedef __int8_t __int_least8_t; +typedef __int16_t __int_least16_t; +typedef __int32_t __int_least32_t; +typedef __int64_t __int_least64_t; + +typedef __uint8_t __uint_least8_t; +typedef __uint16_t __uint_least16_t; +typedef __uint32_t __uint_least32_t; +typedef __uint64_t __uint_least64_t; + +typedef __int8_t int8_t; +typedef __int16_t int16_t; +typedef __int32_t int32_t; +typedef __int64_t int64_t; + +typedef __uint8_t uint8_t; +typedef __uint16_t uint16_t; +typedef __uint32_t uint32_t; +typedef __uint64_t uint64_t; + +typedef __int32_t intptr_t; +typedef __uint32_t uintptr_t; + +#endif diff --git a/libc/arch/i386/make.config b/libc/arch/i386/make.config new file mode 100644 index 0000000..25c1254 --- /dev/null +++ b/libc/arch/i386/make.config @@ -0,0 +1,6 @@ +LIBC_ARCH_INCLUDE=$(ARCHDIR)/include +LIBC_ARCH_CFLAGS=-I$(LIBC_ARCH_INCLUDE) +LIBC_ARCH_LDFLAGS= +LIBC_ARCH_LIBS= + +LIBC_ARCH_OBJS= |