)]}'
{
  "commit": "7fcc471ca223871e5d11ab7bc19be33c2d178ef8",
  "tree": "9da92fbab7926dbd886d5a4fa0a428314dbc31f3",
  "parents": [
    "811cc76ba3e4d6fb7e17b4d9838c16b2c8ec7911"
  ],
  "author": {
    "name": "Alan Modra",
    "email": "amodra@gmail.com",
    "time": "Thu Oct 19 08:51:47 2023 +1030"
  },
  "committer": {
    "name": "Alan Modra",
    "email": "amodra@gmail.com",
    "time": "Mon Dec 11 10:42:59 2023 +1030"
  },
  "message": "R_MICROMIPS_GPREL7_S2\n\nThis reloc is meant for the 16-bit LWGP instruction, 0x6400/0xfc00\nmatch/mask encoding in `micromips_opcodes\u0027.  It is correctly specified\nto operate on a half-word by the howtos in elf32-mips.c, elfn32-mips.c\nand elf64-mips.c, but is incorrectly subject to shuffle/unshuffle in\ncode like _bfd_mips_elf32_gprel16_reloc.\n\nCurrent behaviour when applying the reloc to .byte 0x11,0x22,0x33,0x44\nis to apply the reloc to byte 0x22 when big-endian, and to byte 0x33\nwhen little-endian.  Big-endian behaviour is unchanged after this\npatch and little-endian correctly applies the reloc to byte 0x11.\n\nThe patch also corrects REL addend extraction from section contents,\nand overflow checking.  gold had all of the bfd problems with this\nreloc and additionally did not apply the rightshift by two.\n\nbfd/\n\t* elfxx-mips.c (micromips_reloc_shuffle_p): Return false for\n\tR_MICROMIPS_GPREL7_S2.\n\t(mips_elf_calculate_relocation): Correct sign extension and\n\toverflow calculation for R_MICROMIPS_GPREL7_S2.\n\t(_bfd_mips_elf_relocate_section): Update small-data overflow\n\tmessage.\ngold/\n\t* mips.cc (Mips_relocate_functions::should_shuffle_micromips_reloc):\n\tReturn false for R_MICROMIPS_GPREL7_S2.\n\t(Mips_relocate_functions::mips_reloc_unshuffle): Update comment.\n\t(Mips_relocate_functions::relgprel): Remove R_MICROMIPS_GPREL7_S2\n\thandling.\n\t(Mips_relocate_functions::relgprel7): New function.\n\t(Target_mips::Relocate::relocate): Adjust to suit.\nld/\n\t* testsuite/ld-mips-elf/reloc-4.d: Adjust expected error.\n\t* testsuite/ld-mips-elf/reloc-5.d: Likewise.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4b1ec670dc09ecd3ccc5c0f3696aabbf88bde60d",
      "old_mode": 33188,
      "old_path": "bfd/elfxx-mips.c",
      "new_id": "bae8622fd344feac484ff9aa207757193f92bfab",
      "new_mode": 33188,
      "new_path": "bfd/elfxx-mips.c"
    },
    {
      "type": "modify",
      "old_id": "121cecdf4870b45f77b23317c8ae9b29c2fe7df7",
      "old_mode": 33188,
      "old_path": "gold/mips.cc",
      "new_id": "5b2edcd559a1d775e8c6db79b940a6cdccd58ceb",
      "new_mode": 33188,
      "new_path": "gold/mips.cc"
    },
    {
      "type": "modify",
      "old_id": "936a861c65c093a6d53ea2d40ce7e24b765ebba1",
      "old_mode": 33188,
      "old_path": "ld/testsuite/ld-mips-elf/reloc-4.d",
      "new_id": "3d0a37a2eada2cff9dfd4413f66158d607599528",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-mips-elf/reloc-4.d"
    },
    {
      "type": "modify",
      "old_id": "2fc74ea27d5747f35de23d64548cb1731a087ea8",
      "old_mode": 33188,
      "old_path": "ld/testsuite/ld-mips-elf/reloc-5.d",
      "new_id": "7910b35fcaff7340879b0e4cd1c44b7d7ed7222a",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-mips-elf/reloc-5.d"
    }
  ]
}
