summaryrefslogtreecommitdiff
path: root/ld/testsuite/lib/ld-lib.exp
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/lib/ld-lib.exp')
-rw-r--r--ld/testsuite/lib/ld-lib.exp5
1 files changed, 5 insertions, 0 deletions
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index e5e19ebadd..3d120c8264 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -369,6 +369,11 @@ proc ld_simple_link_defsyms {} {
append flags " --defsym __gccmain=0"
}
+ # Windows targets need __main, prefixed with underscore.
+ if {[istarget *-*-cygwin* ] || [istarget *-*-mingw*]} {
+ append flags " --defsym ___main=0"
+ }
+
# PowerPC EABI code calls __eabi.
if {[istarget powerpc*-*-eabi*] || [istarget powerpc*-*-rtems*]} {
append flags " --defsym __eabi=0"