> compile NEMU

ysyx_22040000 李心杨
Linux calcite 6.6.19 #1-NixOS SMP PREEMPT_DYNAMIC Fri Mar  1 12:35:11 UTC 2024 x86_64 GNU/Linux
 14:47:29  up   1:53,  2 users,  load average: 0.92, 0.69, 0.75
This commit is contained in:
tracer-ysyx 2024-03-20 14:47:29 +08:00 committed by xinyangli
parent 49649b0db8
commit add808138c
3 changed files with 6 additions and 710 deletions

File diff suppressed because one or more lines are too long

View file

@ -57,6 +57,12 @@ void init_elf(const char *path) {
f->name = func;
++func_table_len;
puts(func);
if(func_table_len >= func_table_size) {
Assert(func_table_size * 2 > func_table_size, "Function table exceed memory limit");
func_table_size *= 2;
func_table = realloc(func_table, func_table_size);
Assert(func_table, "Function table exceed memory limit");
}
}
success = true;
failed:

View file

@ -1,9 +0,0 @@
#include <stdlib.h>
#include <macro.h>
// void *realloc_and_copy(void *arr, size_t arr_len, size_t arr_size, size_t nmemb, size_t size)
// {
// Assert(2 * arr_size > arr_size, "Realloc array size exceed size_t limit");
// char *p = (char *)arr;
// realloc(arr, )
// }