mirror of
https://github.com/TinyCC/tinycc.git
synced 2025-11-16 04:24:45 +00:00
tcc -ar: change mode to 644, use ARMAG
This commit is contained in:
2
tcc.h
2
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 "!<arch>\012" /* For COFF and a.out archives */
|
||||
#define ARMAG "!<arch>\n" /* For COFF and a.out archives */
|
||||
|
||||
typedef struct {
|
||||
unsigned int n_strx; /* index into string table of name */
|
||||
|
||||
@@ -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("!<arch>\n", 8, 1, fh);
|
||||
fwrite(ARMAG, 8, 1, fh);
|
||||
// create an empty archive
|
||||
if (!funccnt) {
|
||||
ret = 0;
|
||||
|
||||
Reference in New Issue
Block a user