)]}'
{
  "commit": "eebad48efeeee858be83d754a6b1326133e51d36",
  "tree": "4611e2b89a9fcbe7aecf2a0709c7056cef9ba183",
  "parents": [
    "2304772225e51cb939d3766cde47d7651d15176e"
  ],
  "author": {
    "name": "H.J. Lu",
    "email": "hjl.tools@gmail.com",
    "time": "Thu Apr 18 05:28:56 2024 -0700"
  },
  "committer": {
    "name": "H.J. Lu",
    "email": "hjl.tools@gmail.com",
    "time": "Thu Apr 18 19:17:17 2024 -0700"
  },
  "message": "elf: Strip unreferenced weak undefined symbols\n\nLinker will resolve an undefined symbol only if it is referenced by\nrelocation.  Unreferenced weak undefined symbols serve no purpose.\nWeak undefined symbols appear in the dynamic symbol table only when they\nare referenced by dynamic relocation.  Mark symbols with relocation and\nstrip undefined weak symbols if they don\u0027t have relocation and aren\u0027t\nin the dynamic symbol table.\n\nbfd/\n\n\tPR ld/31652\n\t* elf-bfd.h (elf_link_hash_entry): Add has_reloc.\n\t* elf-vxworks.c (elf_vxworks_emit_relocs): Set has_reloc.\n\t* elflink.c (_bfd_elf_link_output_relocs): Likewise.\n\t(elf_link_output_extsym): Strip undefined weak symbols if they\n\tdon\u0027t have relocation and aren\u0027t in the dynamic symbol table.\n\nld/\n\n\tPR ld/31652\n\t* testsuite/ld-elf/elf.exp: Run undefweak tests.\n\t* testsuite/ld-elf/undefweak-1.rd: New file.\n\t* testsuite/ld-elf/undefweak-1a.s: Likewise.\n\t* testsuite/ld-elf/undefweak-1b.s: Likewise.\n\t* testsuite/ld-x86-64/weakundef-1.nd: Likewise.\n\t* testsuite/ld-x86-64/weakundef-1a.s: Likewise.\n\t* testsuite/ld-x86-64/weakundef-1b.s: Likewise.\n\t* testsuite/ld-x86-64/x86-64.exp: Run undefweak tests.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ef5dcb55e72827a95252890fae29aa6d46c61a2e",
      "old_mode": 33188,
      "old_path": "bfd/elf-bfd.h",
      "new_id": "92a0287d40e14d69531edcb8e3cb6ff666526be1",
      "new_mode": 33188,
      "new_path": "bfd/elf-bfd.h"
    },
    {
      "type": "modify",
      "old_id": "4c172cd411539eb884ce2bbcdb75420009be7306",
      "old_mode": 33188,
      "old_path": "bfd/elf-vxworks.c",
      "new_id": "36e5540f9c045ee7860f0e4a65ef450391946edf",
      "new_mode": 33188,
      "new_path": "bfd/elf-vxworks.c"
    },
    {
      "type": "modify",
      "old_id": "9c53bfcf7d4378404c892c0ca0d67755e0258546",
      "old_mode": 33188,
      "old_path": "bfd/elflink.c",
      "new_id": "4f72d1b2a90d69410bc4283e3336609b48df7456",
      "new_mode": 33188,
      "new_path": "bfd/elflink.c"
    },
    {
      "type": "modify",
      "old_id": "685b87588e776514cb7e5ae578abf5667ba86dd3",
      "old_mode": 33188,
      "old_path": "ld/testsuite/ld-elf/elf.exp",
      "new_id": "874ba662d2b6ac93dc22fe69f46a7596589009e5",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-elf/elf.exp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "5b48c13c892a86f5f9697def70de20f95b3869ba",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-elf/undefweak-1.rd"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "1d885fb99970480190123fecec65aa0e0c760309",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-elf/undefweak-1a.s"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "8ba34ea855e08d3da05c9d8bebc5c260716f9ea0",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-elf/undefweak-1b.s"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "c4c89bfabdb1d43940255f9e229475712b23706f",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-x86-64/weakundef-1.nd"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "b6eea3201a68ca9802f2a1abcf3b4ebfb1ee651e",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-x86-64/weakundef-1a.s"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3d2da7dc54891e806cdebf7d0b5523cab463b6bb",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-x86-64/weakundef-1b.s"
    },
    {
      "type": "modify",
      "old_id": "e370f393a7a53194ec60c5a3334e6750f9e7ac25",
      "old_mode": 33188,
      "old_path": "ld/testsuite/ld-x86-64/x86-64.exp",
      "new_id": "6546fff4efc49d1691e4790222a4d5358edfbe9e",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-x86-64/x86-64.exp"
    }
  ]
}
