tcc -ar: change mode to 644, use ARMAG
This commit is contained in:
parent
9957c686a4
commit
d15dec711d
2 changed files with 3 additions and 3 deletions
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_FORMAT_COFF 2 /* COFF */
|
||||||
#define TCC_OUTPUT_DYN TCC_OUTPUT_DLL
|
#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 {
|
typedef struct {
|
||||||
unsigned int n_strx; /* index into string table of name */
|
unsigned int n_strx; /* index into string table of name */
|
||||||
|
|
|
@ -197,7 +197,7 @@ finish:
|
||||||
|
|
||||||
funcmax = 250;
|
funcmax = 250;
|
||||||
afpos = tcc_realloc(NULL, funcmax * sizeof *afpos); // 250 func
|
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
|
// i_obj = first input object file
|
||||||
while (i_obj < argc)
|
while (i_obj < argc)
|
||||||
|
@ -302,7 +302,7 @@ finish:
|
||||||
if ((hofs & 1)) // align
|
if ((hofs & 1)) // align
|
||||||
hofs++, fpos = 1;
|
hofs++, fpos = 1;
|
||||||
// write header
|
// write header
|
||||||
fwrite("!<arch>\n", 8, 1, fh);
|
fwrite(ARMAG, 8, 1, fh);
|
||||||
// create an empty archive
|
// create an empty archive
|
||||||
if (!funccnt) {
|
if (!funccnt) {
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue