Unified · Split
| @@ -1370,6 +1370,8 @@ static int tcc_set_linker(TCCState *s, const char *option) · 1369 unmodified lines | ||
| 1370 | 1370 | } else if (link_option(option, "soname=", &p)) { |
| 1371 | 1371 | s->soname = copy_linker_arg(p); |
| 1372 | 1372 | #ifdef TCC_TARGET_PE |
| 1373 | + } else if (link_option(option, "large-address-aware", &p)) { | |
| 1374 | + s->pe_characteristics |= 0x20; | |
| 1373 | 1375 | } else if (link_option(option, "file-alignment=", &p)) { |
| 1374 | 1376 | s->pe_file_align = strtoul(p, &end, 16); |
| 1375 | 1377 | } else if (link_option(option, "stack=", &p)) { |
| @@ -744,6 +744,7 @@ struct TCCState { · 743 unmodified lines | ||
| 744 | 744 | #ifdef TCC_TARGET_PE |
| 745 | 745 | /* PE info */ |
| 746 | 746 | int pe_subsystem; |
| 747 | + unsigned pe_characteristics; | |
| 747 | 748 | unsigned pe_file_align; |
| 748 | 749 | unsigned pe_stack_size; |
| 749 | 750 | # ifdef TCC_TARGET_X86_64 |
| @@ -703,6 +703,7 @@ static int pe_write(struct pe_info *pe) · 702 unmodified lines | ||
| 703 | 703 | pe_header.opthdr.SizeOfStackReserve = pe->s1->pe_stack_size; |
| 704 | 704 | if (PE_DLL == pe->type) |
| 705 | 705 | pe_header.filehdr.Characteristics = CHARACTERISTICS_DLL; |
| 706 | + pe_header.filehdr.Characteristics |= pe->s1->pe_characteristics; | |
| 706 | 707 | |
| 707 | 708 | sum = 0; |
| 708 | 709 | pe_fwrite(&pe_header, sizeof pe_header, op, &sum); |