/*1* Copyright 2026 Yuxuan Shui for CodeWeavers2*3* This library is free software; you can redistribute it and/or4* modify it under the terms of the GNU Lesser General Public5* License as published by the Free Software Foundation; either6* version 2.1 of the License, or (at your option) any later version.7*8* This library is distributed in the hope that it will be useful,9* but WITHOUT ANY WARRANTY; without even the implied warranty of10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU11* Lesser General Public License for more details.12*13* You should have received a copy of the GNU Lesser General Public14* License along with this library; if not, write to the Free Software15* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA16*/1718#ifdef __WINE_PE_BUILD1920#include <stdarg.h>21#include <process.h>22#include "windef.h"23#include "winbase.h"24#include "wine/asm.h"2526extern _PVFV __CTOR_LIST__[];27extern _PVFV __DTOR_LIST__[];2829void __cdecl __wine_call_gcc_ctors(void)30{31ULONG_PTR n = (ULONG_PTR)__CTOR_LIST__[0], i;32if (n == (ULONG_PTR)-1) for (n = 0; __CTOR_LIST__[n + 1]; n++);33for (i = n; i >= 1; i--) __CTOR_LIST__[i]();34}3536__ASM_SECTION_POINTER( ".section .CRT$XCB", __wine_call_gcc_ctors )3738void __cdecl __wine_call_gcc_dtors(void)39{40size_t i;41for (i = 1; __DTOR_LIST__[i]; i++) __DTOR_LIST__[i]();42}4344__ASM_SECTION_POINTER( ".section .CRT$XTB", __wine_call_gcc_dtors )4546#endif474849