History

win32: support "-Wl,--large-address-aware" option

Pavlas, Zdenek committed 9 years ago

Commit 04869391 parent 9b3e4c53 files · +4 −0Browse files

Unified · Split

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

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