增加mpu支持
This commit is contained in:
@@ -11,9 +11,7 @@ weak void _fini();
|
||||
int __libc_start_main_init(int (*main)(int,char **,char **), int argc, char **argv,
|
||||
void (*init_dummy)(), void(*fini_dummy)(), void(*ldso_dummy)());
|
||||
|
||||
void _start_c_init(long *p)
|
||||
void _start_c_init(void)
|
||||
{
|
||||
int argc = p[0];
|
||||
char **argv = (void *)(p+1);
|
||||
__libc_start_main_init(main, argc, argv, _init, _fini, 0);
|
||||
__libc_start_main_init(main, NULL, NULL, _init, _fini, 0);
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
#define LINE_MAX 4096
|
||||
#define RE_DUP_MAX 255
|
||||
|
||||
#define NL_ARGMAX 9
|
||||
#define NL_ARGMAX 6
|
||||
#define NL_MSGMAX 32767
|
||||
#define NL_SETMAX 255
|
||||
#define NL_TEXTMAX 2048
|
||||
|
||||
@@ -125,8 +125,9 @@ static void pop_arg(union arg *arg, int type, va_list *ap)
|
||||
break; case UMAX: arg->i = va_arg(*ap, uintmax_t);
|
||||
break; case PDIFF: arg->i = va_arg(*ap, ptrdiff_t);
|
||||
break; case UIPTR: arg->i = (uintptr_t)va_arg(*ap, void *);
|
||||
break; case DBL: arg->f = va_arg(*ap, double);
|
||||
break; case LDBL: arg->f = va_arg(*ap, long double);
|
||||
break; case LDBL:case DBL: arg->f = va_arg(*ap, double);
|
||||
// break;
|
||||
// case LDBL: arg->f = va_arg(*ap, long double);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +138,7 @@ static void out(FILE *f, const char *s, size_t l)
|
||||
|
||||
static void pad(FILE *f, char c, int w, int l, int fl)
|
||||
{
|
||||
char pad[256];
|
||||
char pad[64];
|
||||
if (fl & (LEFT_ADJ | ZERO_PAD) || l >= w) return;
|
||||
l = w - l;
|
||||
memset(pad, c, l>sizeof pad ? sizeof pad : l);
|
||||
|
||||
@@ -14,6 +14,11 @@ void printf_test(void)
|
||||
printf("print test0.\n");
|
||||
printf("print test1.\n");
|
||||
printf("print test2.\n");
|
||||
float a=1.1;
|
||||
float b=1.2;
|
||||
float c=a+b;
|
||||
c=c;
|
||||
printf("%c %d %lf\n", 'a', 1234, 1.1);
|
||||
}
|
||||
int main(int argc, char *args[])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user