)]}'
{
  "commit": "28daddd33accbfc519a2663a4e1bfaa66eafcef0",
  "tree": "9607099cfcf57c5ee33f9c50eee1651bb8e93e93",
  "parents": [
    "bcd739ed0439c29f5789f57f8e28cd0534f721c7"
  ],
  "author": {
    "name": "Alan Modra",
    "email": "amodra@gmail.com",
    "time": "Mon Aug 04 15:29:22 2025 +0930"
  },
  "committer": {
    "name": "Alan Modra",
    "email": "amodra@gmail.com",
    "time": "Sat Aug 16 10:28:58 2025 +0930"
  },
  "message": "Make bfd_check_format better respect given target\n\nbfd_check_format currently does not take much notice of the target\nset in its abfd arg, merely checking that target first if\ntarget_defaulted is false.  As the comment says this was due to\ncomplications with archive handling which I think was fixed in\ncommit f832531609d0.  It should now be possible to just check the\ngiven target, except for linker input files.  This will speed checking\nthe target of the first file in archives, which is done in the process\nof matching archive targets.\n\nThis will no doubt expose some misuse of target options, as found in\nthe binutils \"efi app\" tests.\n\nThe stricter checking also exposed some errors.  Cris targets gave\n\"FAIL: objcopy decompress debug sections in archive (reason: unexpected output)\"\n\"FAIL: objcopy decompress debug sections in archive with zlib-gabi (reason: unexpected output)\"\nwithout the bfd_generic_archive_p fix.  cris has a default target of\ncris-aout which doesn\u0027t match objects for any of the cris-elf or\ncris-linux targets.  The problem here was that checking the first\nobject file in archives didn\u0027t match but a logic error there meant\nbfd_error_wrong_object_format wasn\u0027t returned as it should be.  There\nwas also a possibility of bfd_error_wrong_object_format persisting\nfrom one target check to the next.\n\nbfd/\n\t* archive.c (bfd_generic_archive_p): Correct object in archive\n\ttarget test.\n\t* format.c (bfd_check_format_matches_lto): Try to match given\n\ttarget first even when target_defaulted is set.  Don\u0027t try\n\tother targets if !target_defaulted except for linker input.\n\tClear bfd_error before attempted target matches.\n\t* targets.c (bfd_find_target): Set target_defaulted for\n\tplugin target.\nbinutils/\n\t* bucomm.h (set_plugin_target): Set target_defaulted.\n\t* testsuite/binutils-all/aarch64/pei-aarch64-little.d: Don\u0027t\n\twrongly specify both input and output target, just specify\n\toutput.\n\t* testsuite/binutils-all/loongarch64/pei-loongarch64.d: Likewise.\n\t* testsuite/binutils-all/riscv/pei-riscv64.d: Likewise.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "be96bb25759b7af01a9f3365fef13c650e65fc1f",
      "old_mode": 33188,
      "old_path": "bfd/archive.c",
      "new_id": "16b725b9958456cd6bc7865c2822ec5d349be2cb",
      "new_mode": 33188,
      "new_path": "bfd/archive.c"
    },
    {
      "type": "modify",
      "old_id": "b74c6240f239b0157fc261f6c3b37bcc8a56d665",
      "old_mode": 33188,
      "old_path": "bfd/format.c",
      "new_id": "4dbe863e7427f872b619ed425af5e5498ed53977",
      "new_mode": 33188,
      "new_path": "bfd/format.c"
    },
    {
      "type": "modify",
      "old_id": "c2ee9179f374cdc5686389c85c7cc2c18a0e260d",
      "old_mode": 33188,
      "old_path": "bfd/targets.c",
      "new_id": "a7b0450a0052eca0920f292fe4e69532c5c1ab4e",
      "new_mode": 33188,
      "new_path": "bfd/targets.c"
    },
    {
      "type": "modify",
      "old_id": "8b41d42f5f068a48cfd679a58c011084d1db0b3f",
      "old_mode": 33188,
      "old_path": "binutils/bucomm.h",
      "new_id": "54f54d74286837e37fce42a4d321864527f0385a",
      "new_mode": 33188,
      "new_path": "binutils/bucomm.h"
    },
    {
      "type": "modify",
      "old_id": "27cb6e17db3944ee3d74a526f092e081ff2e85fd",
      "old_mode": 33188,
      "old_path": "binutils/testsuite/binutils-all/aarch64/pei-aarch64-little.d",
      "new_id": "22f664929c5c90eb27acdd555f61f2562c7552b4",
      "new_mode": 33188,
      "new_path": "binutils/testsuite/binutils-all/aarch64/pei-aarch64-little.d"
    },
    {
      "type": "modify",
      "old_id": "574b3e5448d1c97964c783d539790fd3fcf267c1",
      "old_mode": 33188,
      "old_path": "binutils/testsuite/binutils-all/loongarch64/pei-loongarch64.d",
      "new_id": "61b026d59ca903d09912c80328b3591265e815a1",
      "new_mode": 33188,
      "new_path": "binutils/testsuite/binutils-all/loongarch64/pei-loongarch64.d"
    },
    {
      "type": "modify",
      "old_id": "189b0162ba5f7db9f256fd8da15f2acc9d5a80c3",
      "old_mode": 33188,
      "old_path": "binutils/testsuite/binutils-all/riscv/pei-riscv64.d",
      "new_id": "43164147c3d68a521e6aee9cf87ecadbb85da8b2",
      "new_mode": 33188,
      "new_path": "binutils/testsuite/binutils-all/riscv/pei-riscv64.d"
    }
  ]
}
