The documentation of ld [1] says that the default ENTRY point is start. This is not universally true; the default ENTRY point in MinGW is mainCRTStartup.
Steps to reproduce: gcc -nostartfiles the following source code without crt2.o: #include <stdio.h> #include <stdlib.h> int begin() { puts ("begin"); return 0; } int start() { puts ("start"); return 0; } int mainCRTStartup() { puts ("CRT"); return 0; } The program prints "CRT", not "start". In order to solve the problem, modify the documentation to say that the initial symbol is implementation-dependent. [1] <URL:http://sourceware.org/binutils/docs/ld/Entry-Point.html#Entry-Point> -- Summary: The entry point is mainCRTStartup Product: binutils Version: 2.19 Status: NEW Severity: minor Priority: P2 Component: ld AssignedTo: unassigned at sources dot redhat dot com ReportedBy: giecrilj at stegny dot 2a dot pl CC: bug-binutils at gnu dot org GCC build triplet: mingw32 GCC host triplet: mingw32 GCC target triplet: mingw32 http://sourceware.org/bugzilla/show_bug.cgi?id=10865 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils