)]}'
{
  "commit": "717a38e9a02109fcbcb18bb2ec3aa251e2ad0a0d",
  "tree": "8acd270b7aa29a4f2e400d2659ff2192bad44d90",
  "parents": [
    "6ebd38072de4a77a2d28f04a79b64ab570532e98"
  ],
  "author": {
    "name": "H.J. Lu",
    "email": "hjl.tools@gmail.com",
    "time": "Sun May 04 05:12:46 2025 +0800"
  },
  "committer": {
    "name": "H.J. Lu",
    "email": "hjl.tools@gmail.com",
    "time": "Wed May 14 15:09:40 2025 +0800"
  },
  "message": "strip: Add GCC LTO IR support\n\nAdd GCC LTO IR support to strip by copying GCC LTO IR input as unknown\nobject file.  Don\u0027t enable LTO plugin in strip unless all LTO sections\nshould be removed, assuming all LTO sections will be removed with\n-R .gnu.lto_.*.  Add linker LTO tests for strip with --strip-unneeded\nand GCC LTO IR inputs.\n\nbinutils/\n\n\tPR binutils/21479\n\t* objcopy.c: Include \"plugin-api.h\" and \"plugin.h\".\n\t(lto_sections_removed): New.\n\t(command_line_switch): Add OPTION_PLUGIN.\n\t(strip_options): Likewise.\n\t(strip_usage): Display \"--plugin NAME\".\n\t(copy_unknown_file): New function.\n\t(copy_unknown_object): Call copy_unknown_file.\n\t(copy_archive): Copy input LTO IR member as unknown object.\n\t(copy_file): Set input target to \"plugin\" for strip if it is\n\tunset unless all LTO sections should be removed.  Copy input\n\tLTO IR file as unknown file.\n\t(strip_main): Call bfd_plugin_set_program_name. Handle\n\tOPTION_PLUGIN.  Set lto_sections_removed to true if all GCC\n\tLTO sections should be removed.\n\t* doc/binutils.texi: Document --plugin for strip.\n\nld/\n\n\tPR binutils/21479\n\t* testsuite/ld-plugin/lto-binutils.exp: New file.\n\t* testsuite/ld-plugin/strip-1a-fat.c: Likewise.\n\t* testsuite/ld-plugin/strip-1a-fat.rd: Likewise.\n\t* testsuite/ld-plugin/strip-1b-fat.c: Likewise.\n\t* testsuite/ld-plugin/strip-1b-fat.rd: Likewise.\n\t* testsuite/ld-plugin/strip-1a.c: Likewise.\n\t* testsuite/ld-plugin/strip-1b.c: Likewise.\n\t* testsuite/lib/ld-lib.exp (run_cc_link_tests): Add optional\n\ttrailing ld options.\n\nSigned-off-by: H.J. Lu \u003chjl.tools@gmail.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7f041d9deda3caf975046c4500e05cf089a513db",
      "old_mode": 33188,
      "old_path": "binutils/doc/binutils.texi",
      "new_id": "d094f7d70911722da627fb7780c8894902234738",
      "new_mode": 33188,
      "new_path": "binutils/doc/binutils.texi"
    },
    {
      "type": "modify",
      "old_id": "31933e13b7af74617cb9f1de15e0d6d15624b18e",
      "old_mode": 33188,
      "old_path": "binutils/objcopy.c",
      "new_id": "a973789b1d5fbc19849ed77e887dac14dfc95ab3",
      "new_mode": 33188,
      "new_path": "binutils/objcopy.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "db18a63a7b55b0ee663aecb554f9442a0a1cd21e",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-plugin/lto-binutils.exp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "03b2a5c2275e8215321cd72fbfefe5510c0eeac5",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-plugin/strip-1a-fat.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "aefe1c550134f9229e095cc36ba8a0b747f167e1",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-plugin/strip-1a-fat.rd"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "d84af2053381a830a30532e670c166a43b4ce860",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-plugin/strip-1a.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "1a2e4d2d86a2007394baec2901b124409c31fbe8",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-plugin/strip-1b-fat.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e3a266f8beeb62bd581905fbb264f994266e97bf",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-plugin/strip-1b-fat.rd"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "967872a0f12742f88f531a155cdec98a41130158",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-plugin/strip-1b.c"
    },
    {
      "type": "modify",
      "old_id": "96152718d6f2923a4e95142054b7cdb65cf8aab0",
      "old_mode": 33188,
      "old_path": "ld/testsuite/lib/ld-lib.exp",
      "new_id": "119410bc5236dbbaef7901f67331cfba3d662064",
      "new_mode": 33188,
      "new_path": "ld/testsuite/lib/ld-lib.exp"
    }
  ]
}
