diff --git a/tcc.h b/tcc.h index 8ef9ad28..13cd17e0 100644 --- a/tcc.h +++ b/tcc.h @@ -1509,7 +1509,7 @@ ST_DATA int func_bound_add_epilog; #define TCC_OUTPUT_FORMAT_COFF 2 /* COFF */ #define TCC_OUTPUT_DYN TCC_OUTPUT_DLL -#define ARMAG "!\012" /* For COFF and a.out archives */ +#define ARMAG "!\n" /* For COFF and a.out archives */ typedef struct { unsigned int n_strx; /* index into string table of name */ diff --git a/tcctools.c b/tcctools.c index ef4e14e0..606855bf 100644 --- a/tcctools.c +++ b/tcctools.c @@ -197,7 +197,7 @@ finish: funcmax = 250; afpos = tcc_realloc(NULL, funcmax * sizeof *afpos); // 250 func - memcpy(&arhdro.ar_mode, "100666", 6); + memcpy(&arhdro.ar_mode, "100644", 6); // i_obj = first input object file while (i_obj < argc) @@ -302,7 +302,7 @@ finish: if ((hofs & 1)) // align hofs++, fpos = 1; // write header - fwrite("!\n", 8, 1, fh); + fwrite(ARMAG, 8, 1, fh); // create an empty archive if (!funccnt) { ret = 0;