Update README

This commit is contained in:
Ziyao 2022-04-15 14:41:11 +08:00
parent 1311f3b3fb
commit 98c6cad0e9
2 changed files with 28 additions and 3 deletions

6
README
View File

@ -9,15 +9,15 @@ still missing,including:
The original versions of __syscall4(),__syscall5() and __syscall6()
don't work.They are replaced by assembly implemention in
/src/internal/x86_64/syscall.S
- math library is removed momently.
Because some missing floating-point features of TinyCC.I am working
on completing.
- math library has been use the pure C implementation
Because some missing floating-point features of TinyCC.
- @PLT dynamic linking function calls are removed.
TinyCC does not have the feature.Dynamic linking library(.so)
is expected not to work.
Some features had been removed momently but now they are usable,including:
- fenv library(maybe applying a patch to TinyCC is needed)
- math library(using C implementation now)
To compile,simply run
./configure --target=x86_64 CC='tcc' AR='tcc -ar' RANLIB='echo' \

25
tests/malloc.c Normal file
View File

@ -0,0 +1,25 @@
#include<assert.h>
#include<stdio.h>
#include<stdlib.h>
#include<stdint.h>
#include<string.h>
#define BLK_SIZE (2 << 10)
#define TEST_NUM (2 << 10)
int main(void)
{
uint8_t **slots = (uint8_t**)malloc(sizeof(uint8_t*) * TEST_NUM);
printf("%p\n",slots);
assert(slots);
for (int i = 0;i < TEST_NUM;i++) {
slots[i] = (uint8_t*)malloc(BLK_SIZE);
assert(slots[i]);
memset(slots[i],(uint8_t)i,BLK_SIZE);
}
for (int i = 0;i < TEST_NUM;i++)
free(slots[i]);
return 0;
}