)]}'
{
  "commit": "3d5a60de52556f6a53d71d7e607c6696450ae3e4",
  "tree": "cf1a1b08ee6c9814716b5f6e5953cf9d6686f47b",
  "parents": [
    "5e2f0c9a5f3d467a341a0c3d579d9c6ee6daa4d1"
  ],
  "author": {
    "name": "H.J. Lu",
    "email": "hjl.tools@gmail.com",
    "time": "Thu Jun 08 10:01:03 2023 -0700"
  },
  "committer": {
    "name": "H.J. Lu",
    "email": "hjl.tools@gmail.com",
    "time": "Thu Dec 28 08:47:17 2023 -0800"
  },
  "message": "x86-64: Add R_X86_64_CODE_4_GOTPCRELX\n\nFor\n\n\tmov        name@GOTPCREL(%rip), %reg\n\ttest       %reg, name@GOTPCREL(%rip)\n\tbinop      name@GOTPCREL(%rip), %reg\n\nwhere binop is one of adc, add, add, cmp, or, sbb, sub, xor instructions,\nadd\n\n # define R_X86_64_CODE_4_GOTPCRELX  43\n\nif the instruction starts at 4 bytes before the relocation offset.  It\nsimilar to R_X86_64_GOTPCRELX.  Linker can treat R_X86_64_CODE_4_GOTPCRELX\nas R_X86_64_GOTPCREL or convert the above instructions to\n\n\tlea\tname(%rip), %reg\n\tmov\t$name, %reg\n\ttest\t$name, %reg\n\tbinop\t$name, %reg\n\nif the instruction is encoded with the REX2 prefix when possible.\n\nbfd/\n\n\t* elf64-x86-64.c (x86_64_elf_howto_table): Add\n\tR_X86_64_CODE_4_GOTPCRELX.\n\t(R_X86_64_standard): Updated.\n\t(x86_64_reloc_map): Add BFD_RELOC_X86_64_CODE_4_GOTPCRELX.\n\t(elf_x86_64_convert_load_reloc): Handle R_X86_64_CODE_4_GOTPCRELX.\n\t(elf_x86_64_scan_relocs): Likewise.\n\t(elf_x86_64_relocate_section): Likewise.\n\t* reloc.c (bfd_reloc_code_real): Add\n\tBFD_RELOC_X86_64_CODE_4_GOTPCRELX.\n\t* bfd-in2.h: Regenerated.\n\t* libbfd.h: Likewise.\n\ngas/\n\n\t* write.h (fix): Add fx_tcbit3.  Change fx_unused to 1 bit.\n\t* config/tc-i386.c (tc_i386_fix_adjustable): Handle\n\tBFD_RELOC_X86_64_CODE_4_GOTPCRELX.\n\t(tc_gen_reloc): Likewise.\n\t(output_disp): Set fixP-\u003efx_tcbit3 for REX2 prefix.\n\t(i386_validate_fix): Generate BFD_RELOC_X86_64_CODE_4_GOTPCRELX\n\tif fixp-\u003efx_tcbit3 is set.\n\t* config/tc-i386.h (TC_FORCE_RELOCATION_LOCAL): Add\n\tBFD_RELOC_X86_64_CODE_4_GOTPCRELX.\n\t(TC_FORCE_RELOCATION_ABS): Likewise.\n\t* testsuite/gas/i386/x86-64-gotpcrel.s: Add tests for\n\tR_X86_64_CODE_4_GOTPCRELX.\n\t* testsuite/gas/i386/x86-64-localpic.s: Likewise.\n\t* testsuite/gas/i386/x86-64-gotpcrel.d: Updated.\n\t* testsuite/gas/i386/x86-64-localpic.d: Likewise.\n\t* testsuite/gas/i386/ilp32/x86-64-localpic.d: Likewise.\n\ninclude/\n\n\t* elf/x86-64.h (elf_x86_64_reloc_type): Add\n\tR_X86_64_CODE_4_GOTPCRELX.\n\nld/\n\n\t* testsuite/ld-x86-64/apx-load1.s: New file.\n\t* testsuite/ld-x86-64/apx-load1a.d: Likewise.\n\t* testsuite/ld-x86-64/apx-load1b.d: Likewise.\n\t* testsuite/ld-x86-64/apx-load1c.d: Likewise.\n\t* testsuite/ld-x86-64/apx-load1d.d: Likewise.\n\t* testsuite/ld-x86-64/x86-64.exp: Run apx-load1a, apx-load1b,\n\tapx-load1c and apx-load1d.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "782845926eabaf79c271b7ba5b1be4a2375e3d42",
      "old_mode": 33188,
      "old_path": "bfd/bfd-in2.h",
      "new_id": "96709da917095b1d9002639ffdec8413cebb392c",
      "new_mode": 33188,
      "new_path": "bfd/bfd-in2.h"
    },
    {
      "type": "modify",
      "old_id": "3b7a8aeee117b7eb0c2bdf97d90c11eb3dd19732",
      "old_mode": 33188,
      "old_path": "bfd/elf64-x86-64.c",
      "new_id": "a2d1b6f14b7080f4b17d61ecd4d5acfaa1ee0cd3",
      "new_mode": 33188,
      "new_path": "bfd/elf64-x86-64.c"
    },
    {
      "type": "modify",
      "old_id": "8dab44110a68a546af7461c9d5b35380ca445e01",
      "old_mode": 33188,
      "old_path": "bfd/libbfd.h",
      "new_id": "8873fafdde9dc8b64447d50ae3f5109357585a43",
      "new_mode": 33188,
      "new_path": "bfd/libbfd.h"
    },
    {
      "type": "modify",
      "old_id": "6fd0f1fb547d0194ba61b7ed48a89a174554127e",
      "old_mode": 33188,
      "old_path": "bfd/reloc.c",
      "new_id": "56d852d084f896338c7c0d9bdbeb042115695b52",
      "new_mode": 33188,
      "new_path": "bfd/reloc.c"
    },
    {
      "type": "modify",
      "old_id": "ee948a61b180b8887933dc1f3ee39b9987ad66f5",
      "old_mode": 33188,
      "old_path": "gas/config/tc-i386.c",
      "new_id": "8d76446010b38957881b2e872abfb89e278f4b91",
      "new_mode": 33188,
      "new_path": "gas/config/tc-i386.c"
    },
    {
      "type": "modify",
      "old_id": "3cb0c784819b6d993932c4a6085b124051c712cf",
      "old_mode": 33188,
      "old_path": "gas/config/tc-i386.h",
      "new_id": "44227a8376cb5324519ad4b81baa40745691282e",
      "new_mode": 33188,
      "new_path": "gas/config/tc-i386.h"
    },
    {
      "type": "modify",
      "old_id": "d0cc4e8efc9ca79844887141e100262a59eecdc6",
      "old_mode": 33188,
      "old_path": "gas/testsuite/gas/i386/ilp32/x86-64-localpic.d",
      "new_id": "57d4843a5b5163bcb99039fcdfaa1ba21bb9b329",
      "new_mode": 33188,
      "new_path": "gas/testsuite/gas/i386/ilp32/x86-64-localpic.d"
    },
    {
      "type": "modify",
      "old_id": "57792216e9aff0a223b341156c894de884b36998",
      "old_mode": 33188,
      "old_path": "gas/testsuite/gas/i386/x86-64-gotpcrel.d",
      "new_id": "12fadfbca4eee180709304abf65b754e5d47afbf",
      "new_mode": 33188,
      "new_path": "gas/testsuite/gas/i386/x86-64-gotpcrel.d"
    },
    {
      "type": "modify",
      "old_id": "981b14ff4df4b1f6a632d796e7b1f7bfdc3e6813",
      "old_mode": 33188,
      "old_path": "gas/testsuite/gas/i386/x86-64-gotpcrel.s",
      "new_id": "91b1ca204c85bb658f523b38886f4dbf1b0fcf8f",
      "new_mode": 33188,
      "new_path": "gas/testsuite/gas/i386/x86-64-gotpcrel.s"
    },
    {
      "type": "modify",
      "old_id": "62030d410ad90268a4edc1b136407fc31212ef21",
      "old_mode": 33188,
      "old_path": "gas/testsuite/gas/i386/x86-64-localpic.d",
      "new_id": "11eb57b30b7c03cca67e342085b88fd0e2bf9a0c",
      "new_mode": 33188,
      "new_path": "gas/testsuite/gas/i386/x86-64-localpic.d"
    },
    {
      "type": "modify",
      "old_id": "beda94dc2f3e397ed1253ed4c426559d27c93703",
      "old_mode": 33188,
      "old_path": "gas/testsuite/gas/i386/x86-64-localpic.s",
      "new_id": "183dfb6293b7d366421978005ad00fb3abc5dd2d",
      "new_mode": 33188,
      "new_path": "gas/testsuite/gas/i386/x86-64-localpic.s"
    },
    {
      "type": "modify",
      "old_id": "eb30a76bf85ab21132999b131ad3a6650207a4c7",
      "old_mode": 33188,
      "old_path": "gas/write.h",
      "new_id": "fd0ab553b232b1ffd733e23b988dcafac9af04ed",
      "new_mode": 33188,
      "new_path": "gas/write.h"
    },
    {
      "type": "modify",
      "old_id": "1b87beef41a18448c5bb2d3dd1244ac51f40b203",
      "old_mode": 33188,
      "old_path": "include/elf/x86-64.h",
      "new_id": "30d1722cb73151e5abe0455b9ee69f758b4c2c04",
      "new_mode": 33188,
      "new_path": "include/elf/x86-64.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "f5eac57d82efd901b1c29bec9e7beebb4fa6df58",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-x86-64/apx-load1.s"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "162a2343ebe0213320593a57eccdc4355481c4b0",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-x86-64/apx-load1a.d"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "8c8962cad2d1e3fdecae2ece6146e4258435136e",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-x86-64/apx-load1b.d"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "fdfe00cc61cd601cdb0acab1db8abaa703f44611",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-x86-64/apx-load1c.d"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "4da967822ea5b710033e1310adff3d8f0c6954e5",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-x86-64/apx-load1d.d"
    },
    {
      "type": "modify",
      "old_id": "95a2986265bf0565ca56f7500288cdb8322b88fd",
      "old_mode": 33188,
      "old_path": "ld/testsuite/ld-x86-64/x86-64.exp",
      "new_id": "d5c5219222cb1e4ba5ea9e714cc80082fa2c26dd",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-x86-64/x86-64.exp"
    }
  ]
}
