crt: gccmain: Make __do_global_dtors/__do_global_ctors/__main compatible with libgcc
libgcc's __do_global_dtors is incrementing callback iteration pointer
before invoking the callback. This is probably a guard which allows
callback function to call the __do_global_dtors() without invoking the
callback function itself second time.
libgcc's __do_global_ctors is comparing first element of __CTOR_LIST__[]
against -1 with casting both of them to __SIZE_TYPE__ instead of unsigned
long. This has effect for 64-bit windows systems as unsigned long type on
them is 32-bit but __SIZE_TYPE__ is 64-bit.
Signed-off-by: LIU Hao <lh_mouse@126.com>
1 file changed