summaryrefslogtreecommitdiff
path: root/src/cmd/ld/pe.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/ld/pe.c')
-rw-r--r--src/cmd/ld/pe.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cmd/ld/pe.c b/src/cmd/ld/pe.c
index 1d70b4808..f2903ba0f 100644
--- a/src/cmd/ld/pe.c
+++ b/src/cmd/ld/pe.c
@@ -148,6 +148,9 @@ peinit(void)
PESECTHEADR = rnd(PEFILEHEADR, PESECTALIGN);
nextsectoff = PESECTHEADR;
nextfileoff = PEFILEHEADR;
+
+ // some mingw libs depend on this symbol, for example, FindPESectionByName
+ xdefine("__image_base__", SDATA, PEBASE);
}
static void
@@ -533,6 +536,7 @@ addexcept(IMAGE_SECTION_HEADER *text)
uvlong n;
Sym *sym;
+ USED(text);
if(thechar != '6')
return;
@@ -656,7 +660,7 @@ asmbpe(void)
// for other threads we specify stack size in runtime explicitly
// (runtime knows whether cgo is enabled or not).
// If you change stack reserve sizes here,
- // change them in runtime/cgo/windows_386/amd64.c as well.
+ // change STACKSIZE in runtime/cgo/gcc_windows_{386,amd64}.c as well.
if(!iscgo) {
set(SizeOfStackReserve, 0x00010000);
set(SizeOfStackCommit, 0x0000ffff);