)]}'
{
  "commit": "d19a265487eda186b6977d9d15648cda9fad3298",
  "tree": "b5a00da21278e636f234bd0c9c002f463ac1533e",
  "parents": [
    "e9061058b4fb26a6b4a7243f5dca1eb9066f2671"
  ],
  "author": {
    "name": "Fangrui Song",
    "email": "i@maskray.me",
    "time": "Sat Jun 25 10:44:26 2022 -0700"
  },
  "committer": {
    "name": "H.J. Lu",
    "email": "hjl.tools@gmail.com",
    "time": "Tue Jul 19 08:41:52 2022 -0700"
  },
  "message": "x86: Make protected symbols local for -shared\n\nCall _bfd_elf_symbol_refs_local_p with local_protected\u003d\u003dtrue.  This has\n2 noticeable effects for -shared:\n\n* GOT-generating relocations referencing a protected data symbol no\n  longer lead to a GLOB_DAT (similar to a hidden symbol).\n* Direct access relocations (e.g. R_X86_64_PC32) no longer has the\n  confusing diagnostic below.\n\n    __attribute__((visibility(\"protected\"))) void *foo() {\n      return (void *)foo;\n    }\n\n    // gcc -fpic -shared -fuse-ld\u003dbfd\n    relocation R_X86_64_PC32 against protected symbol `foo\u0027 can not be used when making a shared object\n\nThe new behavior matches arm, aarch64 (commit\n83c325007c5599fa9b60b8d5f7b84842160e1d1b), and powerpc ports, and other\nlinkers: gold and ld.lld.\n\nNote: if some code tries to use direct access relocations to take the\naddress of foo, the pointer equality will break, but the error should be\nreported on the executable link, not on the innocent shared object link.\nglibc 2.36 will give a warning at relocation resolving time.\n\nWith this change, `#define elf_backend_extern_protected_data 1` is no\nlonger effective.  Just remove it.\n\nRemove the test \"Run protected-func-1 without PIE\" since -fno-pic\naddress taken operation in the executable doesn\u0027t work with protected\nsymbol in a shared object by default.  Similarly, remove\nprotected-data-1a and protected-data-1b.  protected-data-1b can be made\nworking by removing HAVE_LD_PIE_COPYRELOC from GCC\n(https://sourceware.org/pipermail/gcc-patches/2022-June/596678.html).\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3d39dc07fe0e1bb21e52764c1b597440022662b2",
      "old_mode": 33188,
      "old_path": "bfd/elf32-i386.c",
      "new_id": "04a972e646de16af16bdd7a1c72eb1958a0f5a3d",
      "new_mode": 33188,
      "new_path": "bfd/elf32-i386.c"
    },
    {
      "type": "modify",
      "old_id": "48ca6309d1b0bf377675104c9728f50d2864e937",
      "old_mode": 33188,
      "old_path": "bfd/elf64-x86-64.c",
      "new_id": "3abc68a41275ccae07166609b9d907c004761fbd",
      "new_mode": 33188,
      "new_path": "bfd/elf64-x86-64.c"
    },
    {
      "type": "modify",
      "old_id": "acb2cc8528db8f69bd5168da42cd64bcdabd1905",
      "old_mode": 33188,
      "old_path": "bfd/elfxx-x86.c",
      "new_id": "18f3d33545842af6e25302f42b45e7e1ce01d6b9",
      "new_mode": 33188,
      "new_path": "bfd/elfxx-x86.c"
    },
    {
      "type": "modify",
      "old_id": "a3cb5cef1403733817b6ff46b76d1a4e1223cb8e",
      "old_mode": 33188,
      "old_path": "ld/testsuite/ld-i386/protected1.d",
      "new_id": "531645b8fe84e3eb94ba29be99abea15b14f93e8",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-i386/protected1.d"
    },
    {
      "type": "modify",
      "old_id": "c3a6888d9006ab5fc4a290f74a9fc1601837b7f9",
      "old_mode": 33188,
      "old_path": "ld/testsuite/ld-i386/protected3.d",
      "new_id": "77367c4738f73984e4032c33ca355b859275e088",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-i386/protected3.d"
    },
    {
      "type": "modify",
      "old_id": "7dc350432f4bc117b2f7ec4af5b01e71fdf30a72",
      "old_mode": 33188,
      "old_path": "ld/testsuite/ld-i386/protected6a.d",
      "new_id": "4d3873239f985eb7731785e7c5fd5ae48a47d19b",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-i386/protected6a.d"
    },
    {
      "type": "modify",
      "old_id": "130611ddf4933dc08a3492e67ce317761575ff6f",
      "old_mode": 33188,
      "old_path": "ld/testsuite/ld-x86-64/pr24151a-x32.d",
      "new_id": "1f49b655f7d59e1aa8bd32913654712146b0166d",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-x86-64/pr24151a-x32.d"
    },
    {
      "type": "modify",
      "old_id": "783b85a1a6fcd3a5fad812709ba00c77973f4890",
      "old_mode": 33188,
      "old_path": "ld/testsuite/ld-x86-64/pr24151a.d",
      "new_id": "6c48e383e01468a21e9cc25e12204f569075aa9b",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-x86-64/pr24151a.d"
    },
    {
      "type": "modify",
      "old_id": "783b85a1a6fcd3a5fad812709ba00c77973f4890",
      "old_mode": 33188,
      "old_path": "ld/testsuite/ld-x86-64/protected1.d",
      "new_id": "6c48e383e01468a21e9cc25e12204f569075aa9b",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-x86-64/protected1.d"
    },
    {
      "type": "modify",
      "old_id": "57950e4d6b69205f83b78782b4b78510a7828961",
      "old_mode": 33188,
      "old_path": "ld/testsuite/ld-x86-64/protected3.d",
      "new_id": "ba63991582f38643918fd0bdb2cc82c39d68b7c2",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-x86-64/protected3.d"
    },
    {
      "type": "modify",
      "old_id": "3a7963ffd2ff5c2c2794d86d33c0f8566ed98be7",
      "old_mode": 33188,
      "old_path": "ld/testsuite/ld-x86-64/protected6a.d",
      "new_id": "50d6430b57735895daff16096680802040979833",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-x86-64/protected6a.d"
    },
    {
      "type": "modify",
      "old_id": "3082084a7b8013b8c8e3b601624f16a3108e86df",
      "old_mode": 33188,
      "old_path": "ld/testsuite/ld-x86-64/protected7a.d",
      "new_id": "3974246a2a89e7fdcec3989a6d44941bd6e434ce",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-x86-64/protected7a.d"
    },
    {
      "type": "modify",
      "old_id": "5e5636bcebee05ff8b701603d10a4518b817d22e",
      "old_mode": 33188,
      "old_path": "ld/testsuite/ld-x86-64/x86-64.exp",
      "new_id": "a096c0b9d0f76d52e274cd8a8fc30f3709a932a7",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-x86-64/x86-64.exp"
    }
  ]
}
