)]}'
{
  "commit": "b9f34e3a65782a9f33fe9eaf2240ec4f1f6e3f6e",
  "tree": "86a9f12e073bf610283641d1ecbbc8dc1aaa03c8",
  "parents": [
    "22d86791526b83733a51b107c70e68a54fbd3370"
  ],
  "author": {
    "name": "Tom Stellard",
    "email": "tstellar@redhat.com",
    "time": "Wed Oct 31 17:14:17 2018 +0000"
  },
  "committer": {
    "name": "Tom Stellard",
    "email": "tstellar@redhat.com",
    "time": "Wed Oct 31 17:14:17 2018 +0000"
  },
  "message": "Merging r345002:\n\n------------------------------------------------------------------------\nr345002 | dim | 2018-10-22 22:53:15 -0700 (Mon, 22 Oct 2018) | 41 lines\n\nDon\u0027t mess up RelIplt symbols during relocatable processing\n\nSummary:\nDuring upgrading of the FreeBSD source tree with lld 7.0.0, I noticed\nthat it started complaining about `crt1.o` having an \"index past the\nend of the symbol table\".\n\nSuch a symbol table looks approximately like this, viewed with `readelf\n-s` (note the `Ndx` field being messed up):\n\n```\nSymbol table \u0027.symtab\u0027 contains 4 entries:\n   Num:    Value  Size Type    Bind   Vis      Ndx Name\n     0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND\n     1: 00000000     0 SECTION LOCAL  DEFAULT    1\n     2: 00000000     0 NOTYPE  WEAK   HIDDEN  RSV[0xffff] __rel_iplt_end\n     3: 00000000     0 NOTYPE  WEAK   HIDDEN  RSV[0xffff] __rel_iplt_start\n```\n\nAt first, it seemed that recent ifunc relocation work had caused this:\n\u003chttps://reviews.freebsd.org/rS339351\u003e, but it turned out that it was\ndue to incorrect processing of the object files by lld, when using `-r`\n(a.k.a. --relocatable).\n\nBisecting showed that rL324421 (\"Convert a use of Config-\u003eStatic\") was\nthe commit where this new behavior began.  Simply reverting it solved\nthe issue, and the `__rel_iplt` symbols had an index of `UND` again.\n\nLooking at Rafael\u0027s commit message, I think he simply missed the\npossibility of `--relocatable` being in effect, so I have added an\nadditional check for it.\n\nI also added a simple regression test case.\n\nReviewers: grimar, ruiu, emaste, espindola\n\nReviewed By: ruiu\n\nSubscribers: arichardson, krytarowski, llvm-commits\n\nDifferential Revision: https://reviews.llvm.org/D53515\n------------------------------------------------------------------------\n\ngit-svn-id: https://llvm.org/svn/llvm-project/lld/branches/release_70@345739 91177308-0d34-0410-b5e6-96231b3b80d8\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "88a2d5c71266a649c2eb0cde7cc5261e55f91528",
      "old_mode": 33188,
      "old_path": "ELF/Writer.cpp",
      "new_id": "09a17049ffb4a0828080316d39b225e8e2c23a1f",
      "new_mode": 33188,
      "new_path": "ELF/Writer.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "773a09f5281564af275c536a869c07aa2662d062",
      "new_mode": 33188,
      "new_path": "test/ELF/relocatable-rel-iplt.s"
    }
  ]
}
