)]}'
{
  "commit": "46bbc1c071ca5ceb1d6cfcd38e65eef28f27283c",
  "tree": "5202835d93949c3fab754ac0e37664ca806995a7",
  "parents": [
    "c95dd24e796615b9f41e8821137fc088049eef92"
  ],
  "author": {
    "name": "Martin Storsjö",
    "email": "martin@martin.st",
    "time": "Tue Aug 23 15:48:39 2022 +0300"
  },
  "committer": {
    "name": "Martin Storsjö",
    "email": "martin@martin.st",
    "time": "Tue Aug 30 23:49:08 2022 +0300"
  },
  "message": "ld: pe: Fix linking against Microsoft import libraries with multiple DLLs\n\nInitially, since c6c37250e98f113755e0d787f7070e2ac80ce77e (in 1999),\nin order to fix linking against Microsoft import libraries, ld did\ninternally rename members of such libraries. At that point, the\ncriteria for being considered a Microsoft import library was that\nevery archive member had the same name (no regard for exactly what\nthat name was).\n\nThis was later amended in 44dbf3639f127af46d569ad96b6242dfbc4c0a89\n(in 2003) to allow for Microsoft import libraries with intermixed\nstatic object files. At this point, the criteria were extended, so\nthat all members following the first member named *.dll either had\nthe exact same member name, or be named *.obj. (Curiously, this would\nallow members with any name if it precedes the first one named *.dll.)\n\nIn practice, Microsoft style import libraries can contain\nmembers for linking against more than one DLL (built by merging\nmultiple regular import libraries into one).\n\nInstead of trying to do validation of the whole archive before\nconsidering it a Microsoft style import library, relax the criteria\nfor doing the member renaming: If an archive member is named *.dll\nand it contains .idata sections, assume that that member is a\nMicrosoft import file, and apply the renaming scheme.\n\nThis works for imports for any number of DLLs in the same library,\nintermixed with other static object files (regardless of their\nnames), and vastly simplifies the code.\n\nLLVM generates Microsoft style import libraries, and Rust builds\nseem to bundle up multiple import libraries together with some\nRust specific static objects. This fixes linking directly against\nthem with ld.bfd.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "665c02cad6babb953329eda2cf2c36ffb83a5833",
      "old_mode": 33188,
      "old_path": "ld/emultempl/pe.em",
      "new_id": "c01829670d60cc676ead52250e8f4685e01da05e",
      "new_mode": 33188,
      "new_path": "ld/emultempl/pe.em"
    },
    {
      "type": "modify",
      "old_id": "05214b1ba3cd36eefb7a373d5c986d6eaba55fd7",
      "old_mode": 33188,
      "old_path": "ld/emultempl/pep.em",
      "new_id": "d94f18b05c50369cfe07fc0d32d4a99ddecc8002",
      "new_mode": 33188,
      "new_path": "ld/emultempl/pep.em"
    }
  ]
}
