Op 22 jul. 2011 21:09 schreef "PcX" <xunxun1...@gmail.com> het volgende:
>
> 于 2011/7/13 22:00, PcX 写道:
> >         (3)gcc -g -flto -c main.c
> >            gcc main.o -flto -fuse-linker-plugin
> >            a.exe
> >            it will crash.
> >          In addition, the linker stage have some warnings:
> > ------
> > crt/pseudo-reloc.c:49:13: warning: type of '_image_base__' does not
> > match original declaration [enabled by default]
> > crt/pesect.c:18:25: note: previously declared here
> > crt/crtexe.c:56:36: warning: type of '__xi_a' does not match original
> > declaration [enabled by default]
> > crt/cinitexe.c:6:29: note: previously declared here
> > crt/crtexe.c:57:36: warning: type of '__xi_z' does not match original
> > declaration [enabled by default]
> > crt/cinitexe.c:7:29: note: previously declared here
> Well, I found that if I substituted the crt2.o with no lto crt2.o in
> MinGW64 CRT, then the problem would disappear : the exe will not crash.
>
> So I think we should forbidden "-flto" to compile crtexe.c and crtdll.c,
> which can cause the exe or dll can't find the exec entry if we use
"-flto".

Well,  the proper fix would be to fix either GCC's lto (probably) or
whatever piece of code in the CRT causes lto to mess up.

Ruben
------------------------------------------------------------------------------
10 Tips for Better Web Security
Learn 10 ways to better secure your business today. Topics covered include:
Web security, SSL, hacker attacks & Denial of Service (DoS), private keys,
security Microsoft Exchange, secure Instant Messaging, and much more.
http://www.accelacomm.com/jaw/sfnl/114/51426210/
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to