)]}'
{
  "commit": "648f6099d4dcadf446f3f00790ad4b16dd4042f6",
  "tree": "f806f1f5fa08ad7937c657b8f5107c05afbfee97",
  "parents": [
    "b4eb841afe9306fd7a6df95efcde120bfaa71e32"
  ],
  "author": {
    "name": "Alan Modra",
    "email": "amodra@gmail.com",
    "time": "Fri Jun 24 13:25:45 2022 +0930"
  },
  "committer": {
    "name": "Alan Modra",
    "email": "amodra@gmail.com",
    "time": "Mon Jun 27 12:28:59 2022 +0930"
  },
  "message": "-z relro relaxation and ld script SIZEOF\n\nA number of targets use assignments like:\n. \u003d DATA_SEGMENT_RELRO_END (SIZEOF (.got.plt) \u003e\u003d 12 ? 12 : 0, .);\n(from i386) in linker scripts to put the end of the relro segment past\nthe header in .got.plt.  Examination of testcases like those edited by\nthis patch instead sees the end of the relro segment being placed at\nthe start of .got.plt.  For the i386 pie1 test:\n\n  [ 9] .got.plt          PROGBITS        00002000 001000 00000c 04  WA  0   0  4\n\n  GNU_RELRO      0x000f90 0x00001f90 0x00001f90 0x00070 0x00070 R   0x1\n\nA map file shows:\n\n.dynamic        0x0000000000001f90       0x70\n *(.dynamic)\n .dynamic       0x0000000000001f90       0x70 tmpdir/pie1.o\n                0x0000000000001f90                _DYNAMIC\n\n.got            0x0000000000002000        0x0\n *(.got)\n .got           0x0000000000002000        0x0 tmpdir/pie1.o\n *(.igot)\n                0x0000000000002ff4                . \u003d DATA_SEGMENT_RELRO_END (., (SIZEOF (.got.plt) \u003e\u003d 0xc)?0xc:0x0)\n\n.got.plt        0x0000000000002000        0xc\n *(.got.plt)\n .got.plt       0x0000000000002000        0xc tmpdir/pie1.o\n                0x0000000000002000                _GLOBAL_OFFSET_TABLE_\n\nThe DATA_SEGMENT_RELRO_END value in the map file is weird too.  All of\nthis is triggered by SIZEOF (.got.plt) being evaluated wrongly as\nzero.  Fix it by taking into account the action of\nlang_reset_memory_regions during relaxation.\n\n\t* ldexp.c (fold_name \u003cSIZEOF\u003e): Use rawsize if size has been reset.\n\t* ldlang.c (lang_size_sections_1): Don\u0027t reset processed_vma here.\n\t* testsuite/ld-i386/pie1.d: Adjust to suit.\n\t* testsuite/ld-x86-64/pr20830a.d: Likewise.\n\t* testsuite/ld-x86-64/pr20830b.d: Likewise.\n\t* testsuite/ld-x86-64/pr21038a.d: Likewise.\n\t* testsuite/ld-x86-64/pr21038b.d: Likewise.\n\t* testsuite/ld-x86-64/pr21038c.d: Likewise.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c18b8284ca513830ed7ab198ae1ca4cffee14f04",
      "old_mode": 33188,
      "old_path": "ld/ldexp.c",
      "new_id": "d4d8706968dc74770f776e3d2bb8eab050028fc4",
      "new_mode": 33188,
      "new_path": "ld/ldexp.c"
    },
    {
      "type": "modify",
      "old_id": "839535bdb7342b3f9b18c7811ce442837cbe6514",
      "old_mode": 33188,
      "old_path": "ld/ldlang.c",
      "new_id": "e640380e90181de6e68145d41a7133c797d18557",
      "new_mode": 33188,
      "new_path": "ld/ldlang.c"
    },
    {
      "type": "modify",
      "old_id": "338d05784d0384509c9972224c1f797a5ec83e23",
      "old_mode": 33188,
      "old_path": "ld/testsuite/ld-i386/pie1.d",
      "new_id": "fdc65b101f6f8c817603f31245d13f8b79313fcf",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-i386/pie1.d"
    },
    {
      "type": "modify",
      "old_id": "2c47a51b19d60cb9c4a329f97845fe5f7151a769",
      "old_mode": 33188,
      "old_path": "ld/testsuite/ld-x86-64/pr20830a.d",
      "new_id": "1d92b10ba7142f792ea144207bb119da5737d0a8",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-x86-64/pr20830a.d"
    },
    {
      "type": "modify",
      "old_id": "047adc174608fd56d391f33565c736b65496c42f",
      "old_mode": 33188,
      "old_path": "ld/testsuite/ld-x86-64/pr20830b.d",
      "new_id": "303a0242573e8c567f897513ed214c72072896b3",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-x86-64/pr20830b.d"
    },
    {
      "type": "modify",
      "old_id": "070d37e5bcc824d00933a76cf77f2ec9db32bbe6",
      "old_mode": 33188,
      "old_path": "ld/testsuite/ld-x86-64/pr21038a.d",
      "new_id": "06e504ec9562d39fd2e26e9733d01a2db4758335",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-x86-64/pr21038a.d"
    },
    {
      "type": "modify",
      "old_id": "d6a9567364df0e83cb8c2a077239b2b71b139343",
      "old_mode": 33188,
      "old_path": "ld/testsuite/ld-x86-64/pr21038b.d",
      "new_id": "0e77d2c89d7aac1db1a551cff09f4abec73e0767",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-x86-64/pr21038b.d"
    },
    {
      "type": "modify",
      "old_id": "6784d336a536d392f4be6f2e74bb8d8ca3160892",
      "old_mode": 33188,
      "old_path": "ld/testsuite/ld-x86-64/pr21038c.d",
      "new_id": "afbdb56086cd4b86e8dc81d2e2d61fe338277ddf",
      "new_mode": 33188,
      "new_path": "ld/testsuite/ld-x86-64/pr21038c.d"
    }
  ]
}
