)]}'
{
  "commit": "bb9f026c4f815c7c7d08f0e4fde48d0314a355ed",
  "tree": "847f43c2cbbae8a4856250f09d387ec5437e210c",
  "parents": [
    "dcaa1102d73a66964f51fc181c4140caa95f4425"
  ],
  "author": {
    "name": "Matthieu Longo",
    "email": "matthieu.longo@arm.com",
    "time": "Sun Apr 13 01:51:55 2025 +0100"
  },
  "committer": {
    "name": "Matthieu Longo",
    "email": "matthieu.longo@arm.com",
    "time": "Thu Jan 22 10:11:16 2026 +0000"
  },
  "message": "OAv2 merge: plumbing of generic merge logic during linkage\n\nThis patch adds the plumbing for the OAv2 generic merge logic in the\nlinker. The linker is an \"advanced\" consumer of OAv2. After parsing,\nit deduplicates the attributes, merges them, detects any compatibility\nissues, and finally translates them to GNU properties.\n\nThis patch only prepares the infrastructure required to support that\nprocessing. All operations described below rely on helpers or stubs,\nand their implementation details will be added in the subsequent\npatches.\n\n** Intended pipeline\n\nDisclaimer: the description below documents the intended processing\npipeline. This commit only establishes the phases boundaries, and\ncall sites. The actual logic of each step is implemented in subsequent\npatches.\n\nThe OAv2 processing pipeline follows a map-reduce pattern. Obviously,\nthe actual processing in GNU ld is not multi-threaded, and the\noperations are not necessarily executed directly one after another.\n\n* Phase 1, map: successive per-file operations applied on the list of\n  compatible input objects.\n  1. Parsing of the OAv2 section\u0027s data (also used by objcopy).\n  2. Translation of relevant GNU properties to OAv2. This is required\n     for the backward-compatibility with input objects only marked\n     using GNU properties.\n  3. Sorting of the subsections and object attributes. Further\n     operations rely on the ordering to perform some optimization in\n     the processing of the data.\n  4. Deduplication of subsections and object attributes, and detection\n     of any conflict between duplicated subsections or tags.\n  5. Translation of relevant OAv2 to GNU properties for a forward\n     -compatibility with the GNU properties merge.\n  6. Marking of unknown subsections to skip them during the merge\n     (in phase 2), and to prune them before the output object\u0027s\n     serialization (in phase 3).\n\n* Phase 2, reduce: OAv2 in input objects are merged together.\n  1. Gathering of \"frozen\" values (\u003dcoming from the command-line\n     arguments) into a virtual read-only list of subsections and\n     attributes.\n  2. Merging of OAv2 from an input file and the frozen input.\n  3. Merging of the results of step 2 together. Since the OAv2 merge\n     is commutative and associative, it can be implemented as a reduce.\n     However, GNU ld implements it as an accumulate because it does\n     not support multithreading.\n  Notes: the two merge phases also perform a marking of unsupported/\n  invalid subsections and attributes. This marking can be used for\n  debugging, and also more practically, to drop unsupported optional\n  subsections from the output.\n\n* Phase 3, finalization of the output.\n  1. Pruning of the unknown / unsupported / invalid subsections and\n     attributes.\n  2. Serialization of OAv2 data (also used by objcopy).\n  Notes:\n   - There is no translation of the merged OAv2 to GNU properties\n     at this stage, as the GNU properties merge process has already\n     all the needed information (translated in step 5 of stage 1) to\n     produce the GNU properties equivalents.\n   - The GNU properties are currently required as the runtime linker\n     does not understand OAv2 yet.\n   - Phase 3 should also include a compatibility check between the\n     final merge result of the current link unit and input shared\n     objects. I opted for postponing this compatibility check, and\n     GNU properties merge will take care of it as it already does.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5b448e9a7de268b2dcd9a17eb55d2f47d9f8dee4",
      "old_mode": 33188,
      "old_path": "bfd/elf-attrs.c",
      "new_id": "6c32eb3f59c5de62fc297fd9f789e61f21cb233e",
      "new_mode": 33188,
      "new_path": "bfd/elf-attrs.c"
    },
    {
      "type": "modify",
      "old_id": "2f564f1ae53a5a404b296c15abca8290da252cdb",
      "old_mode": 33188,
      "old_path": "bfd/elf-attrs.h",
      "new_id": "b57481035c504dea933014083236e8020f0bbc6a",
      "new_mode": 33188,
      "new_path": "bfd/elf-attrs.h"
    },
    {
      "type": "modify",
      "old_id": "21e7b656ee772bd13041f2ec3cc1ab83dc4266a4",
      "old_mode": 33188,
      "old_path": "bfd/elf-bfd.h",
      "new_id": "187e90c5c12da9cda06a02bd74f929b5766e1de3",
      "new_mode": 33188,
      "new_path": "bfd/elf-bfd.h"
    },
    {
      "type": "modify",
      "old_id": "2fcf25a794c93f395959e03a617e885f883e353e",
      "old_mode": 33188,
      "old_path": "bfd/elfxx-target.h",
      "new_id": "10d14c0045aec4aef7a65c2703c431d0632c00e9",
      "new_mode": 33188,
      "new_path": "bfd/elfxx-target.h"
    },
    {
      "type": "modify",
      "old_id": "a3f892a1934253db96f3cc7fbbd1c0a4cb3eed18",
      "old_mode": 33188,
      "old_path": "ld/ldelf.c",
      "new_id": "fbab75aeefbdee89f38fb240804662b2f4527150",
      "new_mode": 33188,
      "new_path": "ld/ldelf.c"
    }
  ]
}
