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
1509#define TCC_OUTPUT_FORMAT_COFF 2 /* COFF */1509#define TCC_OUTPUT_FORMAT_COFF 2 /* COFF */
1510#define TCC_OUTPUT_DYN TCC_OUTPUT_DLL1510#define TCC_OUTPUT_DYN TCC_OUTPUT_DLL
1511 1511
1512#define ARMAG "!<arch>\012" /* For COFF and a.out archives */1512#define ARMAG "!<arch>\n" /* For COFF and a.out archives */
1513 1513
1514typedef struct {1514typedef struct {
1515 unsigned int n_strx; /* index into string table of name */1515 unsigned int n_strx; /* index into string table of name */
tcctools.c+2−2
@@ -197,7 +197,7 @@ finish: · 196 unmodified lines
197 197
198 funcmax = 250;198 funcmax = 250;
199 afpos = tcc_realloc(NULL, funcmax * sizeof *afpos); // 250 func199 afpos = tcc_realloc(NULL, funcmax * sizeof *afpos); // 250 func
200 memcpy(&arhdro.ar_mode, "100666", 6);200 memcpy(&arhdro.ar_mode, "100644", 6);
201 201
202 // i_obj = first input object file202 // i_obj = first input object file
203 while (i_obj < argc)203 while (i_obj < argc)
@@ -302,7 +302,7 @@ finish: · 98 unmodified lines
302 if ((hofs & 1)) // align302 if ((hofs & 1)) // align
303 hofs++, fpos = 1;303 hofs++, fpos = 1;
304 // write header304 // write header
305 fwrite("!<arch>\n", 8, 1, fh);305 fwrite(ARMAG, 8, 1, fh);
306 // create an empty archive306 // create an empty archive
307 if (!funccnt) {307 if (!funccnt) {
308 ret = 0;308 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