History

tcc -ar: change mode to 644, use ARMAG

noneofyourbusiness committed 3 years ago

Commit d15dec71 parent 9957c682 files · +3 −3Browse files

Unified · Split

2 files
  1. tcc.h +1 −1
  2. tcctools.c +2 −2
tcc.h+1−1
@@ -1509,7 +1509,7 @@ ST_DATA int func_bound_add_epilog; · 1508 unmodified lines
15091509 #define TCC_OUTPUT_FORMAT_COFF 2 /* COFF */
15101510 #define TCC_OUTPUT_DYN TCC_OUTPUT_DLL
15111511
1512−#define ARMAG "!<arch>\012" /* For COFF and a.out archives */
1512+#define ARMAG "!<arch>\n" /* For COFF and a.out archives */
15131513
15141514 typedef struct {
15151515 unsigned int n_strx; /* index into string table of name */
tcctools.c+2−2
@@ -197,7 +197,7 @@ finish: · 196 unmodified lines
197197
198198 funcmax = 250;
199199 afpos = tcc_realloc(NULL, funcmax * sizeof *afpos); // 250 func
200− memcpy(&arhdro.ar_mode, "100666", 6);
200+ memcpy(&arhdro.ar_mode, "100644", 6);
201201
202202 // i_obj = first input object file
203203 while (i_obj < argc)
@@ -302,7 +302,7 @@ finish: · 98 unmodified lines
302302 if ((hofs & 1)) // align
303303 hofs++, fpos = 1;
304304 // write header
305− fwrite("!<arch>\n", 8, 1, fh);
305+ fwrite(ARMAG, 8, 1, fh);
306306 // create an empty archive
307307 if (!funccnt) {
308308 ret = 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t