)]}'
{
  "commit": "90b7a5df152a64d2bea20beb438e8b81049a5c30",
  "tree": "02a86981b9fab3de79108a80950f35c1a2825353",
  "parents": [
    "f18acc9c4e5d18f4783f3a7d59e3ec95d7af0199"
  ],
  "author": {
    "name": "Fangrui Song",
    "email": "i@maskray.me",
    "time": "Wed Jun 22 10:55:12 2022 -0700"
  },
  "committer": {
    "name": "Fangrui Song",
    "email": "i@maskray.me",
    "time": "Wed Jun 22 10:55:12 2022 -0700"
  },
  "message": "aarch64: Disallow copy relocations on protected data\n\nIf an executable has copy relocations for extern protected data, that\ncan only work if the shared object containing the definition is built\nwith assumptions (a) the compiler emits GOT-generating relocations (b)\nthe linker produces R_*_GLOB_DAT instead of R_*_RELATIVE.  Otherwise the\nshared object uses its own definition directly and the executable\naccesses a stale copy.  Note: the GOT relocations defeat the purpose of\nprotected visibility as an optimization, and it turns out this never\nworked perfectly.\n\nglibc 2.36 will warn on copy relocations on protected data.  Let\u0027s\nproduce a warning at link time, matching ld.lld which has been used on\nmany aarch64 OSes.\n\nNote: x86 requires GNU_PROPERTY_NO_COPY_ON_PROTECTED to have the error.\nThis is to largely due to GCC 5\u0027s \"x86-64: Optimize access to globals in\nPIE with copy reloc\" which started to use direct access relocations for\nexternal data symbols in -fpie mode.\n\nGCC\u0027s aarch64 port does not have the change.  Nowadays with most builds\nswitching to -fpie/-fpic, aarch64 mostly doesn\u0027t need to worry about\ncopy relocations.  So for aarch64 we simply don\u0027t check\nGNU_PROPERTY_NO_COPY_ON_PROTECTED.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ca24a6b56786df561cd88101ee880036e8a141b4",
      "old_mode": 33188,
      "old_path": "bfd/elfnn-aarch64.c",
      "new_id": "81311fc5a329b5b435592e3ac4d5a1a9d110b308",
      "new_mode": 33188,
      "new_path": "bfd/elfnn-aarch64.c"
    },
    {
      "type": "modify",
      "old_id": "64476f111e0296c1351b1eb6cc63f176936d2c02",
      "old_mode": 33188,
      "old_path": "ld/testsuite/ld-aarch64/aarch64-elf.exp",
      "new_id": "31162277bd99aeee995f3eb7cfb0e881bb160119",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-aarch64/aarch64-elf.exp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "99a356a3df6f9aa428862cf2501ca355cc08bcbc",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-aarch64/copy-reloc-protected.d"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "eb3fb402dc42c68e8eabdf3e3bd9f6216c89a687",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-aarch64/protected.s"
    }
  ]
}
