Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 8624 → Rev 8625

/contrib/kolibri-libc/tests/test_dirent.c
File deleted
/contrib/kolibri-libc/tests/Makefile.tcc
File deleted
/contrib/kolibri-libc/tests/static.lds
File deleted
/contrib/kolibri-libc/tests/Makefile.gcc
File deleted
/contrib/kolibri-libc/tests/mathtest.c
File deleted
\ No newline at end of file
/contrib/kolibri-libc/tests/argtest.c
File deleted
/contrib/kolibri-libc/SYMBOLS.md
File deleted
/contrib/kolibri-libc/.gitignore
File deleted
/contrib/kolibri-libc/bin/clink
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/contrib/kolibri-libc/bin/fasm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/contrib/kolibri-libc/bin/kos32-tcc
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/contrib/kolibri-libc/bin/kos32-tcc.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/contrib/kolibri-libc/bin/kpack
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/contrib/kolibri-libc/README.md
File deleted
/contrib/kolibri-libc/linuxtools/clink
Cannot display: file marked as a binary type.
svn:mime-type = application/x-executable
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/x-executable
\ No newline at end of property
/contrib/kolibri-libc/linuxtools/kld
21,4 → 21,4
FLAGS="-m elf_i386 -nostdlib"
 
# And, execute ld:
ld $FLAGS -L $KLIBC/bin/lib -T $KLIBC/tests/static.lds $KLIBC/bin/lib/crt0.o $*
ld $FLAGS -L $KLIBC/lib -T $KLIBC/static.lds $KLIBC/lib/crt0.o $*
/contrib/kolibri-libc/linuxtools/mklib
Cannot display: file marked as a binary type.
svn:mime-type = application/x-executable
Property changes:
Added: svn:executable
+*
\ No newline at end of property
Added: svn:mime-type
+application/x-executable
\ No newline at end of property
/contrib/kolibri-libc/linuxtools/mklib.c
0,0 → 1,46
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
 
typedef struct List_s {
char *this;
struct List_s *next;
} List;
 
int main() {
List *root;
for (List **pitem = &root;; pitem = &(*pitem)->next) {
size_t n = 1024;
*pitem = calloc(1, sizeof(List));
List *item = *pitem;
item->this = calloc(1, n);
fgets(item->this, n, stdin);
if (item->this[0] == '\n') {
free(*pitem);
*pitem = NULL;
break;
} else {
item->this[strlen(item->this) - 1] = '\0';
}
}
 
for (List *item = root; item; item = item->next) {
char asm_name[255];
sprintf(asm_name, "%s.asm", item->this);
FILE *out = fopen(asm_name, "wb");
 
fprintf(out, "format ELF\n");
fprintf(out, "include \"__lib__.inc\"\n");
fprintf(out, "fun equ __func@%s\n", item->this);
fprintf(out, "fun_str equ '%s'\n", item->this);
fprintf(out, "section '.text'\n");
fprintf(out, "fun_name db fun_str, 0\n");
fprintf(out, "section '.data'\n");
fprintf(out, "extrn lib_name\n");
fprintf(out, "public fun as fun_str\n");
fprintf(out, "fun dd fun_name\n");
fprintf(out, "lib dd lib_name\n");
 
fclose(out);
}
}
/contrib/kolibri-libc/loader/Makefile
0,0 → 1,17
FASM = fasm
MKLIB = ../linuxtools/mklib
 
SRCS=$(wildcard *.asm)
OBJS=$(SRCS:.asm=.o)
 
%.o : %.asm
$(FASM) $<
 
all: asm_gen $(OBJS)
ar -rsc ../lib/libc.obj.a *.o
 
asm_gen:
cat symbols.txt | $(MKLIB)
 
clean:
rm -f *.o
/contrib/kolibri-libc/loader/__lib__.asm
0,0 → 1,9
format ELF
 
include '__lib__.inc'
 
section '.text'
 
public lib_name
 
lib_name db 0x55, 0xAA, lib_name_str, 0
/contrib/kolibri-libc/loader/__lib__.inc
0,0 → 1,2
lib_name equ @libc.obj
lib_name_str equ '/sys/lib/libc.obj'
/contrib/kolibri-libc/loader/abs.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@abs
fun_str equ 'abs'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/acos.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@acos
fun_str equ 'acos'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/acosh.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@acosh
fun_str equ 'acosh'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/asin.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@asin
fun_str equ 'asin'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/asinh.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@asinh
fun_str equ 'asinh'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/atan.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@atan
fun_str equ 'atan'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/atan2.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@atan2
fun_str equ 'atan2'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/atanh.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@atanh
fun_str equ 'atanh'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/atoi.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@atoi
fun_str equ 'atoi'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/atol.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@atol
fun_str equ 'atol'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/atoll.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@atoll
fun_str equ 'atoll'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/calloc.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@calloc
fun_str equ 'calloc'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/ceil.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@ceil
fun_str equ 'ceil'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/clearerr.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@clearerr
fun_str equ 'clearerr'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/closedir.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@closedir
fun_str equ 'closedir'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/cos.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@cos
fun_str equ 'cos'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/cosh.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@cosh
fun_str equ 'cosh'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/debug_printf.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@debug_printf
fun_str equ 'debug_printf'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/difftime.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@difftime
fun_str equ 'difftime'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/div.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@div
fun_str equ 'div'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/exit.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@exit
fun_str equ 'exit'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/exp.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@exp
fun_str equ 'exp'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/fabs.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@fabs
fun_str equ 'fabs'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/fclose.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@fclose
fun_str equ 'fclose'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/feof.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@feof
fun_str equ 'feof'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/ferror.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@ferror
fun_str equ 'ferror'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/fflush.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@fflush
fun_str equ 'fflush'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/fgetc.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@fgetc
fun_str equ 'fgetc'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/fgetpos.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@fgetpos
fun_str equ 'fgetpos'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/fgets.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@fgets
fun_str equ 'fgets'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/floor.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@floor
fun_str equ 'floor'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/fmod.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@fmod
fun_str equ 'fmod'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/fopen.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@fopen
fun_str equ 'fopen'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/fputc.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@fputc
fun_str equ 'fputc'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/fputs.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@fputs
fun_str equ 'fputs'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/fread.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@fread
fun_str equ 'fread'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/free.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@free
fun_str equ 'free'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/freopen.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@freopen
fun_str equ 'freopen'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/frexp.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@frexp
fun_str equ 'frexp'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/fseek.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@fseek
fun_str equ 'fseek'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/fsetpos.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@fsetpos
fun_str equ 'fsetpos'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/ftell.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@ftell
fun_str equ 'ftell'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/fwrite.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@fwrite
fun_str equ 'fwrite'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/getchar.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@getchar
fun_str equ 'getchar'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/gets.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@gets
fun_str equ 'gets'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/hypot.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@hypot
fun_str equ 'hypot'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/labs.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@labs
fun_str equ 'labs'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/ldexp.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@ldexp
fun_str equ 'ldexp'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/ldiv.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@ldiv
fun_str equ 'ldiv'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/llabs.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@llabs
fun_str equ 'llabs'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/lldiv.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@lldiv
fun_str equ 'lldiv'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/localtime.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@localtime
fun_str equ 'localtime'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/log.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@log
fun_str equ 'log'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/make.bat
0,0 → 1,114
fasm __lib__.asm
fasm abs.asm
fasm acos.asm
fasm acosh.asm
fasm asin.asm
fasm asinh.asm
fasm atan.asm
fasm atan2.asm
fasm atanh.asm
fasm atoi.asm
fasm atol.asm
fasm atoll.asm
fasm calloc.asm
fasm ceil.asm
fasm clearerr.asm
fasm closedir.asm
fasm cos.asm
fasm cosh.asm
fasm debug_printf.asm
fasm difftime.asm
fasm div.asm
fasm exit.asm
fasm exp.asm
fasm fabs.asm
fasm fclose.asm
fasm feof.asm
fasm ferror.asm
fasm fflush.asm
fasm fgetc.asm
fasm fgetpos.asm
fasm fgets.asm
fasm floor.asm
fasm fmod.asm
fasm fopen.asm
fasm fputc.asm
fasm fputs.asm
fasm fread.asm
fasm free.asm
fasm freopen.asm
fasm frexp.asm
fasm fseek.asm
fasm fsetpos.asm
fasm ftell.asm
fasm fwrite.asm
fasm getchar.asm
fasm gets.asm
fasm hypot.asm
fasm labs.asm
fasm ldexp.asm
fasm ldiv.asm
fasm llabs.asm
fasm lldiv.asm
fasm localtime.asm
fasm log.asm
fasm malloc.asm
fasm memccpy.asm
fasm memchr.asm
fasm memcmp.asm
fasm memcpy.asm
fasm memmove.asm
fasm memset.asm
fasm mktime.asm
fasm modf.asm
fasm modfl.asm
fasm opendir.asm
fasm perror.asm
fasm pow.asm
fasm pow10.asm
fasm pow2.asm
fasm printf.asm
fasm puts.asm
fasm readdir.asm
fasm realloc.asm
fasm remove.asm
fasm rename.asm
fasm rewind.asm
fasm rewinddir.asm
fasm seekdir.asm
fasm setbuf.asm
fasm setvbuf.asm
fasm sin.asm
fasm sinh.asm
fasm snprintf.asm
fasm sprintf.asm
fasm sqrt.asm
fasm strcat.asm
fasm strchr.asm
fasm strcmp.asm
fasm strcoll.asm
fasm strcpy.asm
fasm strcspn.asm
fasm strerror.asm
fasm strlen.asm
fasm strncat.asm
fasm strncmp.asm
fasm strncpy.asm
fasm strpbrk.asm
fasm strrchr.asm
fasm strrev.asm
fasm strspn.asm
fasm strstr.asm
fasm strtok.asm
fasm strxfrm.asm
fasm tan.asm
fasm tanh.asm
fasm telldir.asm
fasm time.asm
fasm tmpfile.asm
fasm tmpnam.asm
fasm vprintf.asm
fasm vsnprintf.asm
kos32-ar -ru liblibc.obj.a *.o
del *.o
pause
/contrib/kolibri-libc/loader/malloc.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@malloc
fun_str equ 'malloc'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/memccpy.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@memccpy
fun_str equ 'memccpy'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/memchr.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@memchr
fun_str equ 'memchr'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/memcmp.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@memcmp
fun_str equ 'memcmp'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/memcpy.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@memcpy
fun_str equ 'memcpy'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/memmove.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@memmove
fun_str equ 'memmove'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/memset.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@memset
fun_str equ 'memset'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/mktime.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@mktime
fun_str equ 'mktime'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/modf.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@modf
fun_str equ 'modf'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/modfl.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@modfl
fun_str equ 'modfl'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/opendir.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@opendir
fun_str equ 'opendir'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/perror.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@perror
fun_str equ 'perror'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/pow.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@pow
fun_str equ 'pow'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/pow10.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@pow10
fun_str equ 'pow10'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/pow2.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@pow2
fun_str equ 'pow2'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/printf.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@printf
fun_str equ 'printf'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/puts.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@puts
fun_str equ 'puts'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/readdir.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@readdir
fun_str equ 'readdir'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/realloc.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@realloc
fun_str equ 'realloc'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/remove.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@remove
fun_str equ 'remove'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/rename.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@rename
fun_str equ 'rename'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/rewind.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@rewind
fun_str equ 'rewind'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/rewinddir.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@rewinddir
fun_str equ 'rewinddir'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/seekdir.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@seekdir
fun_str equ 'seekdir'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/setbuf.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@setbuf
fun_str equ 'setbuf'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/setvbuf.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@setvbuf
fun_str equ 'setvbuf'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/sin.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@sin
fun_str equ 'sin'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/sinh.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@sinh
fun_str equ 'sinh'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/snprintf.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@snprintf
fun_str equ 'snprintf'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/sprintf.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@sprintf
fun_str equ 'sprintf'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/sqrt.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@sqrt
fun_str equ 'sqrt'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/strcat.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@strcat
fun_str equ 'strcat'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/strchr.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@strchr
fun_str equ 'strchr'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/strcmp.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@strcmp
fun_str equ 'strcmp'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/strcoll.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@strcoll
fun_str equ 'strcoll'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/strcpy.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@strcpy
fun_str equ 'strcpy'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/strcspn.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@strcspn
fun_str equ 'strcspn'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/strerror.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@strerror
fun_str equ 'strerror'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/strlen.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@strlen
fun_str equ 'strlen'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/strncat.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@strncat
fun_str equ 'strncat'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/strncmp.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@strncmp
fun_str equ 'strncmp'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/strncpy.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@strncpy
fun_str equ 'strncpy'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/strpbrk.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@strpbrk
fun_str equ 'strpbrk'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/strrchr.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@strrchr
fun_str equ 'strrchr'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/strrev.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@strrev
fun_str equ 'strrev'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/strspn.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@strspn
fun_str equ 'strspn'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/strstr.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@strstr
fun_str equ 'strstr'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/strtok.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@strtok
fun_str equ 'strtok'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/strxfrm.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@strxfrm
fun_str equ 'strxfrm'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/symbols.txt
0,0 → 1,111
abs
acos
acosh
asin
asinh
atan
atan2
atanh
atoi
atol
atoll
calloc
ceil
clearerr
closedir
cos
cosh
debug_printf
difftime
div
exit
exp
fabs
fclose
feof
ferror
fflush
fgetc
fgetpos
fgets
floor
fmod
fopen
fputc
fputs
fread
free
freopen
frexp
fseek
fsetpos
ftell
fwrite
getchar
gets
hypot
labs
ldexp
ldiv
llabs
lldiv
localtime
log
malloc
memccpy
memchr
memcmp
memcpy
memmove
memset
mktime
modf
modfl
opendir
perror
pow
pow10
pow2
printf
puts
readdir
realloc
remove
rename
rewind
rewinddir
seekdir
setbuf
setvbuf
sin
sinh
snprintf
sprintf
sqrt
strcat
strchr
strcmp
strcoll
strcpy
strcspn
strerror
strlen
strncat
strncmp
strncpy
strpbrk
strrchr
strrev
strspn
strstr
strtok
strxfrm
tan
tanh
telldir
time
tmpfile
tmpnam
vprintf
vsnprintf
 
/contrib/kolibri-libc/loader/tan.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@tan
fun_str equ 'tan'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/tanh.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@tanh
fun_str equ 'tanh'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/telldir.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@telldir
fun_str equ 'telldir'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/time.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@time
fun_str equ 'time'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/tmpfile.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@tmpfile
fun_str equ 'tmpfile'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/tmpnam.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@tmpnam
fun_str equ 'tmpnam'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/vprintf.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@vprintf
fun_str equ 'vprintf'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/loader/vsnprintf.asm
0,0 → 1,11
format ELF
include "__lib__.inc"
fun equ __func@vsnprintf
fun_str equ 'vsnprintf'
section '.text'
fun_name db fun_str, 0
section '.data'
extrn lib_name
public fun as fun_str
fun dd fun_name
lib dd lib_name
/contrib/kolibri-libc/samples/Makefile
0,0 → 1,18
KGCC = ../linuxtools/kgcc
KLD = ../linuxtools/kld
KPACK = kpack
KTCC=../../../programs/develop/ktcc/trunk/bin/kos32-tcc
KTCC_FLAGS = -nostdlib -I$(KLIBC)/source/include -L$(KLIBC)/lib $(KLIBC)/lib/crt0.o
 
static_kgcc:
$(KGCC) basic_gui.c
$(KLD) basic_gui.o -o basic_gui -lc
$(KPACK) basic_gui
 
static_tcc:
$(KTCC) $(KTCC_FLAGS) basic_gui.c -o basic_gui -lc
$(KPACK) basic_gui
 
dynamic_tcc:
$(KTCC) $(KTCC_FLAGS) -D_DYNAMIC basic_gui.c -o basic_gui_dyn -lc.obj
$(KPACK) basic_gui_dyn
/contrib/kolibri-libc/samples/basic_gui.c
0,0 → 1,116
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include "ksys.h"
 
ksys_colors_table_t sys_color_table;
 
char statusbar[255];
ksys_proc_table_t proc_info;
char text_line[255];
 
enum BUTTONS
{
BTN_QUIT = 1,
BTN_POP = 10,
BTN_UNLOCK = 11
};
 
#define FONT_W 8
#define FONT_H 14
#define LINES 10
 
void draw_window()
{
int win_hight, win_width, i, pos_y = _ksys_get_skin_height() + 36; // 60 == 24+36
 
// start redraw
_ksys_start_draw();
// define&draw window
_ksys_create_window(10, 40, 600, 400, "My window", sys_color_table.work_area, 0x13);
_ksys_process_info(&proc_info, -1);
 
win_width = proc_info.winx_size;
win_hight = proc_info.winy_size;
 
_ksys_define_button(10, 30, 70, 20, BTN_POP, sys_color_table.work_button);
_ksys_draw_text("BUTTON1", 15, 34, 0, 0x90000000 | sys_color_table.work_button_text); //0x80000000 asciiz
 
_ksys_define_button(100, 30, 80, 20, BTN_UNLOCK, sys_color_table.work_button);
_ksys_draw_text("BUTTTON2", 110, 34, 0, 0x90000000 | sys_color_table.work_button_text);
 
// display statusbar
_ksys_draw_bar(6, win_hight - 17, win_width - 11, 12, 0x80000000 | sys_color_table.work_area); //0x80000000 gradient
_ksys_draw_text(statusbar, 10, win_hight - 15, 0, 0x80000000 | sys_color_table.work_text);
 
// display strings
for (i = LINES; i > 0; i--){
snprintf (text_line, sizeof text_line, "Line[%d]<<Just a text>>", i);
 
text_line[(win_width - 10 - 5) / FONT_W + 1] = '\0'; // clip text size, seems to big lines crashing OS, and form len by window size
_ksys_draw_text(text_line, 5, pos_y, 0, 0x90000000 | sys_color_table.work_text);
pos_y += FONT_H;
 
if(pos_y + 29 > win_hight) break; // 12 font + 12 statusbar + 5 border
}
// end redraw
_ksys_end_draw();
}
 
int main()
{
int gui_event;
uint32_t pressed_button = 0, mouse_button;
ksys_pos_t mouse_pos;
strcpy(statusbar, "Program running...Double click on TEXT for details");
 
_ksys_get_colors(&sys_color_table);
_ksys_set_event_mask(0xC0000027); // mouse events only when focused window and mouse inside
 
do{
gui_event = _ksys_get_event();
switch(gui_event)
{
case KSYS_EVENT_NONE:
break;
case KSYS_EVENT_REDRAW:
draw_window();
break;
case KSYS_EVENT_KEY:
break;
case KSYS_EVENT_BUTTON:
pressed_button = _ksys_get_button();
switch (pressed_button)
{
case BTN_POP:
strcpy(statusbar, "POP pressed....");
draw_window();
break;
case BTN_UNLOCK:
strcpy(statusbar, "UNLOCK pressed....");
draw_window();
break;
case BTN_QUIT:
return 0;
break;
}
break;
case KSYS_EVENT_MOUSE:
mouse_pos = _ksys_get_mouse_pos(0); // window relative
mouse_button = _ksys_get_mouse_eventstate();
debug_printf("mouse ev (%d,%d)%x\n", mouse_pos.x, mouse_pos.y, mouse_button);
if (mouse_button & (1<<24)) // double click
{
int n = (mouse_pos.y - 60) / FONT_H;
if (n < 0 || n >= LINES) break;
debug_printf("click on str(%d), clip slot(%d)\n", n, LINES - n - 1);
sprintf(statusbar, "click on str(%d), clip slot(%d)\n", n, LINES - n - 1);
draw_window();
}
break;
}
} while(1) ; /* End of main activity loop */
 
return 0;
}
/contrib/kolibri-libc/source/Makefile
1,9 → 1,9
AR = ar -rcs
CLINK = ../bin/clink
KPACK = ../bin/kpack
CLINK = ../linuxtools/clink
KPACK = kpack
 
INCLUDE = include
LIB_DIR = ../bin/lib
LIB_DIR = ../lib
 
LIBC.A = $(LIB_DIR)/libc.a
LIBC.OBJ = $(LIB_DIR)/libc.obj
/contrib/kolibri-libc/source/Makefile.ktcc
0,0 → 1,5
KTCC=../../../programs/develop/ktcc/trunk/bin/kos32-tcc
 
all:
make clean
env CC=$(KTCC) make
/contrib/kolibri-libc/static.lds
0,0 → 1,113
OUTPUT_FORMAT("binary")
 
ENTRY(_start)
SECTIONS
{
.text 0x000000:
{
LONG(0x554e454D);
LONG(0x32305445);
LONG(1);
LONG(_start);
LONG(___iend);
LONG(___memsize);
LONG(___stacktop);
LONG(__argv);
LONG(__path); /* full path */
LONG(0); /*FIXME tls data */
 
*(.init)
*(.text)
*(SORT(.text$*))
*(.text.*)
*(.glue_7t)
*(.glue_7)
___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*)); LONG (0);
___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*)); LONG (0);
*(.fini)
/* ??? Why is .gcc_exc here? */
*(.gcc_exc)
PROVIDE (etext = .);
*(.gcc_except_table)
}
 
.rdata ALIGN(16) :
{
*(.rdata)
*(SORT(.rdata$*))
___RUNTIME_PSEUDO_RELOC_LIST__ = .;
__RUNTIME_PSEUDO_RELOC_LIST__ = .;
*(.rdata_runtime_pseudo_reloc)
___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
__RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
}
.CRT ALIGN(16) :
{
___crt_xc_start__ = . ;
*(SORT(.CRT$XC*)) /* C initialization */
___crt_xc_end__ = . ;
___crt_xi_start__ = . ;
*(SORT(.CRT$XI*)) /* C++ initialization */
___crt_xi_end__ = . ;
___crt_xl_start__ = . ;
*(SORT(.CRT$XL*)) /* TLS callbacks */
/* ___crt_xl_end__ is defined in the TLS Directory support code */
___crt_xp_start__ = . ;
*(SORT(.CRT$XP*)) /* Pre-termination */
___crt_xp_end__ = . ;
___crt_xt_start__ = . ;
*(SORT(.CRT$XT*)) /* Termination */
___crt_xt_end__ = . ;
}
 
.data ALIGN(16) :
{
__data_start__ = . ;
*(.data)
*(.data2)
*(SORT(.data$*))
*(.jcr)
__CRT_MT = .;
LONG(0);
__data_end__ = . ;
*(.data_cygwin_nocopy)
}
 
.eh_frame ALIGN(16) :
{
*(.eh_frame)
___iend = . ;
}
 
bss ALIGN(16):
{
*(.bss)
*(COMMON)
. = ALIGN(16);
___menuet__app_path_area = .;
. = . + 1024 + 16;
___stacktop = .;
___memsize = . ;
}
 
/DISCARD/ :
{
*(.debug$S)
*(.debug$T)
*(.debug$F)
*(.drectve)
*(.note.GNU-stack)
*(.comment)
*(.debug_abbrev)
*(.debug_info)
*(.debug_line)
*(.debug_frame)
*(.debug_loc)
*(.debug_pubnames)
*(.debug_aranges)
*(.debug_ranges)
}
 
}