)]}'
{
  "commit": "3dc9decb77b32713a683dbb44c56416400946b78",
  "tree": "d7ed9c4b727f80ce2a33619210af5ff91ad60c1c",
  "parents": [
    "2612fbe42fe6f9584aa8309f18ca3219281a2acc"
  ],
  "author": {
    "name": "Pali Rohár",
    "email": "pali.rohar@gmail.com",
    "time": "Sat Aug 15 13:16:06 2026 +0200"
  },
  "committer": {
    "name": "LIU Hao",
    "email": "lh_mouse@126.com",
    "time": "Mon Sep 07 22:42:26 2026 +0800"
  },
  "message": "crt: Do not use atexit() for calling gcc global destructors in DLL builds\n\nFunction atexit() for DLL libraries is provided by mingw-w64, which is\nstatically linked on demand when needed.\n\nGlobal destructors for DLL libraries are currently called via first\nregistered DLL atexit callback and atexit callbacks are executed explicitly\nfrom the DLL entry point (for process detach event) in reverse order.\n\nExecution of global destructors does not require DLL atexit support, so\ncall them explicitly after the invocation of atexit callbacks.\n\nProvide two new functions __mingw_dll_do_global_ctors() and\n__mingw_dll_do_global_dtors() which are suitable only for DLL builds.\n\n__mingw_dll_do_global_ctors() is doing same thing as __main() except it\ndoes not register atexit callback for dtors. It contains guard which\nprevents executing globacl constructor multiple times.\n\n__mingw_dll_do_global_dtors() is doing exactly same thing as\natexit callback __do_global_dtors(), just is called explictly.\n\nBoth functions __mingw_dll_do_global_ctors() and __mingw_dll_do_global_dtors()\nmust be separated from the compilation unit which provides __main symbol to\nprevent linker referencing the atexit symbol. For this purpose provide\nthese two new functions via mingw_dll_ctors_dtors.c compilation unit.\nAnd to prevent code duplicate at source level, define its functionality\ndirectly in the gccmain.c with the preprocessor condition.\n\nSigned-off-by: LIU Hao \u003clh_mouse@126.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "397a8fbf73e74b1bb4a485dfd7133a3cf4af40d8",
      "old_mode": 33188,
      "old_path": "mingw-w64-crt/Makefile.am",
      "new_id": "85ba32940589912b2a012c1f1a1f69fcb51217fa",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/Makefile.am"
    },
    {
      "type": "modify",
      "old_id": "65dca8daaf432f007fb332c7644f6d215ddaf6bc",
      "old_mode": 33188,
      "old_path": "mingw-w64-crt/crt/crtdll.c",
      "new_id": "31a137f3401241ddbd002a15b1fb5bd610625aa8",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/crt/crtdll.c"
    },
    {
      "type": "modify",
      "old_id": "de1cf0e1b42c549a74f2215123ba808ce3fc88d5",
      "old_mode": 33188,
      "old_path": "mingw-w64-crt/crt/gccmain.c",
      "new_id": "2954f7181fe77f3cb285b7a281c6ac80579ace6a",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/crt/gccmain.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "8143c6b72998473c4df1efa0654f36e59fbc2b53",
      "new_mode": 33188,
      "new_path": "mingw-w64-crt/crt/mingw_dll_ctors_dtors.c"
    }
  ]
}
