)]}'
{
  "commit": "6c5eabaf45bed70acc2e64d8846ccb2eb0752e7e",
  "tree": "01cac5d392fd775856a1611de77d10e4cf104395",
  "parents": [
    "c90055a270f60b126a04630d2db43e9d200c374c"
  ],
  "author": {
    "name": "Alan Modra",
    "email": "amodra@gmail.com",
    "time": "Mon Jun 01 18:28:11 2026 +0930"
  },
  "committer": {
    "name": "Alan Modra",
    "email": "amodra@gmail.com",
    "time": "Mon Jun 01 18:28:11 2026 +0930"
  },
  "message": "macho section symbol handling\n\nThe macho gas support starts a new frag at non-local labels,\nidentifying the frag with the label symbol as a \"subsection\".  Relocs\nare needed when referencing labels in a different subsection, to\nsupport relaxation.  There is a problem when reloc symbols are reduced\nto a section symbol plus offset (see write.c:adjust_reloc_syms), as\nthis loses the subsection.  Not reducing symbols like this is not a\ngood option as it results in a large number of symbols, some with\nweird internal gas names.  So instead this patch finds the original\nfrag for any fx_addsy reduced to a section symbol.\n\nTest results are:\n+FAIL: .org test 1\n-FAIL: i386 opcodes\n-FAIL: i386 opcodes (Intel disassembly)\n-FAIL: i386 opcodes (w/ suffix)\n-FAIL: i386 intel (AT\u0026T disassembly)\n-FAIL: i386 intel\n-FAIL: Check -madd-bnd-prefix\n-FAIL: x86-64 RTM insns\n-FAIL: x86-64 RTM insns (Intel disassembly)\n-FAIL: Check -madd-bnd-prefix (x86-64)\n\nThe reason \".org test 1\" fails is the -gdwarf2 .debug_aranges\ngenerates two temp symbols and uses them for the start and size of\neach range, the size being calculated by \"end\" - \"beg\" (see\nout_debug_aranges).  For the test, \"beg\" is before any source symbol\nis emitted so has subsection NULL.  \"end\" has a subsection but lost\nthat when the fixup was converted to a section symbol plus offset.\nSo prior to this change obj_mach_o_in_different_subsection returned\nfalse.  Now that the lost subsection is recovered for \"end\" it returns\ntrue, and results in \"Error: can\u0027t resolve .text - L0^A$\".\n\n\t* config/obj-macho.c (obj_mach_o_in_different_subsection):\n\tAdd parameters.  Get frag containing section sym plus offset.\n\t(obj_mach_o_force_reloc_sub_same): Adjust to suit\n\tobj_mach_o_in_different_subsection change.\n\t(obj_mach_o_force_reloc_sub_local): Likewise.\n\t(obj_mach_o_force_reloc): Likewise.\n\t* testsuite/gas/i386/insn-32.d: Don\u0027t xfail darwin.\n\t* write.c (get_frag_for_address): New function, extracted from..\n\t(get_frag_for_reloc): ..here.\n\t* write.h (get_frag_for_address): Declare.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6de2410e1a70aa4faf3de075e2883f4772927463",
      "old_mode": 33188,
      "old_path": "gas/config/obj-macho.c",
      "new_id": "bf6f2758bc7f95a7fa2812f2a0d79f6ad9c7b60e",
      "new_mode": 33188,
      "new_path": "gas/config/obj-macho.c"
    },
    {
      "type": "modify",
      "old_id": "c2d8202bd2ebe0be534fc1946a7a135427c27385",
      "old_mode": 33188,
      "old_path": "gas/testsuite/gas/i386/insn-32.d",
      "new_id": "2649fdcf94ebc3b07f6492d68ff5eaf2cb4f86e0",
      "new_mode": 33188,
      "new_path": "gas/testsuite/gas/i386/insn-32.d"
    },
    {
      "type": "modify",
      "old_id": "9bb47857936099246cd07b99c04b83070109ce84",
      "old_mode": 33188,
      "old_path": "gas/write.c",
      "new_id": "9514c3df42e9f90ecf28825cef767cf30de79c95",
      "new_mode": 33188,
      "new_path": "gas/write.c"
    },
    {
      "type": "modify",
      "old_id": "7281930c2d6c70bfa9e0bc7ab74102ec0eb83d01",
      "old_mode": 33188,
      "old_path": "gas/write.h",
      "new_id": "bc5260a2efdbb8fde00a849b4a1e928d1212463d",
      "new_mode": 33188,
      "new_path": "gas/write.h"
    }
  ]
}
